C
C#12mo ago
Florian Voß

Issue with Filtering in DataGrid

I use Telerik UI's DataGrid control for .Net Maui. As you see VIPStatus column holds values such as "No VIP", "Partner", "Senior Manager" etc. but the filter offers me the values 0, 1, 2, 3, 4, 5 instead. This is because VIPStatus is of type int on my model, I'm using a ValueConverter to convert to "No VIP" and stuff. What can I do about it? I want the values from my cells to be on the filter, just like it is for the other columns
No description
No description
1 Reply
Florian Voß
Florian VoßOP12mo ago
oh and for two reasons I dont have seperation between model and entity classes, I only have models. Otherwise I could just make the property a string on my model and keep it an int on the entity. Reason 1: I dont use ORM, so I should not have Entity classes right? Reason 2: My models must have a unique identifier anyway themselves for when I update smth by editing a cell I gotta find the object to update by id, so might as well just use the model for both displaying things with a viewmodel, and for db communication
Want results from more Discord servers?
Add your server