Blazorise
Blazorise copied to clipboard
DataGrid -> Custom Class / Display per Column DOCUMENTATION
Use-case is simple. I want to hide or show columns based on the screen width.
Using a vanilla table, I can do this by just adding the proper classes.
Ie,
class="d-lg-none d-xl-table-cell"
Using Blazorize, I cannot seem to find the proper method for settings these classes. Browsing through tickets, and googling, I find references to a Display property, however, there is no supporting documentation for how to utilize this property.
I see references to HeaderCellClass
and CellClass
. However, these are again, not documented that I can find at all.
The Display property sounds exactly like what I should be using here, However, again, there is no documentation on how to use this. Browsing the source code... I see properties which should exist for this.
But, given they are instancted properties and I cannot find any supported documentation, this is the best method I can determine on how this class/property should be used:
<DataGridColumn Display="new FluentDisplay().OnWidescreen"
BUT, this causes...
Unhandled exception rendering component: Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Blazorise.FluentDisplay.WithBreakpoint(Breakpoint breakpoint) at Blazorise.FluentDisplay.get_OnWidescreen()
Based on what I can determine browsing the source code, all of the functionality I am trying to use appears to exist. However there is little to no documentation or reference material on how to properly use this functionality.
Hello, these are part of our more generic utility based properties. There's generally an helper with the same exact name, that's a fluent builder. This is how you use them: https://blazorise.com/docs/helpers/utilities
Let us know if you still need help with this.
That was actually pretty easy. I would still recommend eventually updating the documentation to have a few additional pointers to that page.
As well, perhaps a tad more documentation around the different fluent options.
Thanks for the response.
Right, maybe we can have a few pointers on the actual Parameter description to the utilities page. @stsrki ?
Thanks for the suggestion, glad you got it working. :)
Yes, I plan to improve documentation for the utility classes because they are relatively unique in the Blazor world. So a proper documentation must be available :)
Unrelated, but, I have been trying out the Blazorise.DataGrid.
The more I use it, the more i love it. It seems well thought out, and so far, has included every piece of functionality I have been looking for. Keep up the good work!