How to clear data only from ultragrid..Keep other settings intact as they dont change and i dont want to apply the definition again and again..
Also, what exactly does sortedcolumns.clear do? can you give a specific example?
Thanks for your help
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; band.SortedColumns.Add("Int32 1", false, true); band.SortedColumns.Add("DateTime 1", false, false); }
The second option pls which is easier..i just ned to order within the group and not the group column itself
I'd be happy to give you some sample code, but which one are you trying to do?
Either way, it must be done after the grid is bound.
Thanks.Can you provide a code sample..Also, i do this before binding data to the grid or after binding data.
Hi Sandeep,
What are you trying to sort - the GroupByRows, or the data under the GroupByRows?
The latter is pretty easy - you just have to add another column to the SortedColumns collection of the band.
The former is more complicated because in order to group, the grid sorts the data first and then groups the rows with the same values. So you would have to change the sort order of the column itself, probably by using a SortComparer.