Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
Auto-Sort
posted

Hi,

I have a CheckBox to allow a user to select whether or not they would want a list to be auto sorted with the following in a CheckChanged event:

if (this.ultraCheckEditorAutoSort.Checked)
 {
this.ultraGridUsers.DisplayLayout.Bands[1].SortedColumns.Clear();
this.ultraGridUsers.DisplayLayout.Bands[1].SortedColumns.Add("Alias", false);
this.ultraGridUsers.DisplayLayout.Bands[0].SortedColumns.Add("GroupID", false);
}
else
{
this.ultraGridUsers.DisplayLayout.Bands[1].SortedColumns.Clear();
this.ultraGridUsers.DisplayLayout.Bands[1].SortedColumns.Add("AutoID", false);
this.ultraGridUsers.DisplayLayout.Bands[0].SortedColumns.Add("AutoID", false);
}

The problem is when I have it sorted and I add a new row, it will not be automatically sorted.  It will work if you toggle off and on the AutoSort option (checkbox) again.  My question is: is there a way to implement AutoSort automatically and/or is there a way to refresh the grid after I add a row?

Thanks in advance

Parents Reply Children
No Data