FluentUI Data Grid and OData #599
Replies: 7 comments 8 replies
-
i hope fluent ui team use your codes to improve their datagrid as soon as possible because it is really helpful and powerful. |
Beta Was this translation helpful? Give feedback.
-
Couldn't you create a pull request for this feature? Would love to use this, it's incredible! Would be even better, if the filters also worked without OData (or maybe they already do?) |
Beta Was this translation helpful? Give feedback.
-
The Filter Model isn’t tied to OData already, you can theoretically plug in a different Filter Manager for translating it. Coming up with a Filter model, that satisfies everyone isn’t possible I think. There’s a reason people buy Telerik Components for the Data Grid (at least I did). 🫣 In a more recent implementation of the FluentUI Grid, I have used Kiota to generate a Client SDK from an OData Service. It works very well with Blazor. I think I will update the original blog article, because the OData Connected Client isn’t working well with Blazor. That said, please let me know, if we can generalize something in the code. |
Beta Was this translation helpful? Give feedback.
-
It's okay, we forgive you 😉. I also think that an universal satisfactory Filter model is not achievable. What your article showed is that the DataGrid can use extensions for it. Think we should let the implementation details to you the developers instead of offering a default. What we can do is update/extend the documentation on this. @bytefish are you willing to supply a PR with those steps (can be in Markdown format? Or do we just link to your blog? |
Beta Was this translation helpful? Give feedback.
-
@vnbaaij I am preparing a small example, and I will put it in the In the Code, I have a Is there any chance, we could make this public, so 3rd Party implementations could use it? |
Beta Was this translation helpful? Give feedback.
-
@vnbaaij I split my questions into separate comments, so we don't confuse it. In the Code I wanted to have the Filter Selection DropDown in its own Component, so I do not pollute the several Filter Components with Conversion between Strings and Enumerations. This turned out to be somewhat problematic, when it comes to styling, or passing the additional Properties down to the Original ComboBox. I would rather avoid it. These days, I would bind it straightforward at the expense of some more code, like this: What's your thoughts on it? For this example I don't want to introduce any "over-engineered" overhead. |
Beta Was this translation helpful? Give feedback.
-
Hey everyone interested, I have been trying to move the OData Fluent UI DataGrid example from my sample project to the FluentUI Demo page. But as far as I can see, it's not possible without writing miles and miles of integration code. Why? At the moment I am generating an OData URI, that gets sent to the OData Endpoint. This is very simple to do, it's just some string formatting. A generic solution, that could be applied elsewhere, would need to operate on the I've considered some options for a demo, like the one Kendo UI once did: But from personal experience? It's a very brittle solution and I wouldn't give it a try. Also doing so sets very false expectations, which lead to bugs and pain down the line. Let's just say, the generated You can see their But all this would belong into a separate NuGet Package, rather than a Demo Page, if you ask me. Tagging you for a notification @vnbaaij. |
Beta Was this translation helpful? Give feedback.
-
I have written an example project for connecting the FluentUI DataGrid to an OData-enabled Backend. It allows to query, sort and filter on the server-side with a few lines of code:
Here is what the Data Grid looks like:
And it's possible to provide filters for each column, for example a filter on text:
The example project comes with components to define filters for each column, it looks like this in Razor:
The article I have written contains some additional information on how to generate the OData Client and a bit of reasoning:
Beta Was this translation helpful? Give feedback.
All reactions