Hello,
I have a column in a wingrid which has a drop down list. This column is also being grouped on. When the user selects a new value from the drop down I would like the row to appear in the appropriate group based on the value. I.e. It might look like to start:
Groupd by Status
(+)Active
-Row 1 Status Active
(+)Inactive
-Row 2 Statis Inactive
If user changes status in row 1 to Inactive it should now look like this:
-Row 1 Status Inactive
I have tried to simulate this by putting some code in AfterCellUpdate:
this.ultraGrid.DisplayLayout.Bands[0].SortedColumns.RefreshSort(true);
This has an interesting affect. When the user selects the new value this is what it looks like:
It creates two groupings with the same value. I've checked and the grouped by values are exactly the same. If you drag the group by column out of the group by box and then drag it back in, they are still grouped in seperate headers with the same values.
Is there an easy and proper way to do this?
thanks!
James
I have figured out the solution to this. I turns out that the grouping was based on the underlying 'value' of the text field not the display text. Because my valuelist had defauts for these(I.e. valuelistitem1, valuelistitem2) it was grouping based on those even though the values the user saw were 'Active' 'Inactive' etc. Changing the 'values' in the value list to reflect the 'display' text fixed this issue. Is there a way to tell the listbox to goup by displayed 'Text' instead of 'Values'? Is there a reason these are different for cells? I can understand it for dropdowns as these might actually be key values.
Hi,
I was with you until the last few sentences of your post, then you lost me.
But, I think what you might be looking for is the GroupByMode property of the column. You can set it to Text to have it group by Text instead of Value.
This is exactly what I was looking for. Thanks!