Sort by fraction
We have a column in the grid that the users would like to see as a fraction, enter as a fraction, and sorty as a fraction. However, sorting does not work correctly. For instance, sorting would be:
where it should be
I tried to instead convert that to numeric value behind the scenes and use a display template to display the fraction. However, when they go to edit, it shows the numeric value instead of the fraction.
Ideally, I could tell the column to use the text fraction as the bind, but sort by the numeric version.
There is not an easy solution. You could do the sort by the
behind-the-scene by using the numeric field. But as you already figured it, it becomes hard to edit. Maybe you could also use custom EditTemplate for editing and then convert through the setter of the numeric field?
We actually have the SortField feature planned for the next milestone https://github.com/Megabit/Blazorise/issues/625. We could prioritize it and release it on MyGet as a preview of 0.9.5.
The sort by would be a great addition as I have had to create work arounds a number of times to try and get similar sorting to work. In this case with fractions it was just much more difficult since they also wanted to edit the field. Looking forward to that addition!