Hi,
e.Layout.Bands[0].SortedColumns.Add("Date", false, true);
Group by column is done using above code but my problem is I dont want sorting on Date Column. Following is the example of Data in data table and its display in grid with sorting of Date column That i don't want.
Is there any other way to Group Column in code?
Let's say I'm binding a list of objects to the UltraGrid, and I want to group the rows by one of the properties of the object. How do I set this up?
I see that I can make the UltraGrid sort by the property in question, but what about the GroupHeader and the UltraGridGroupByRows?
Thanks,
Chris McKenzie
After Bind method.
if you will write ultraGrid1.Rows.count it will the total of group rows. it wont give the total rows in dataset. So as per you convient moves row by following statement
ultraGrid1.Rows.Move(column,index)
Hiren,
Can you please explain briefly how did you use Move method to solve the above issue?
Regards,
Sunil
Thanks Mike
I have solved that issue using Move method.
Thanks & Regards,
Hiren Kalavadia
Hi Hiren,
I don't think you can. Grouping and sorting are tightly tied together. In order for rows to be grouped, they have to be together. The way grouping works is that the grid sorts the rows and then loops through the rows looking for values that are the same and that are next to each other. If the rows were not sorted, then you could end up with two different groups that both have the same value, which would not make any sense.
I think there is a method on the Rows collection called Move or Reposition or something like that, which you can use to move a row. But I'm not sure what effect that will have on grouping. It might not work.