What syntax should I be using to sort Grid on multi column (Empid ,Name) at Run - Time.
I understand single column Sort code:
UgOpportunities.Bands(0).SortedColumns.Add(UgOpportunities.Columns.FromKey("ProductName"), True)
Thanks is advance.
It looks like you are using UltraWebGrid, not UltraWinGrid.
In UltraWinGrid, the code you have here would be redundant. Adding the column to the SortedColumns collection implicitly sets the SortIndicator and you certainly don't have to do both. I don't know anything about the UltraWebGrid, though. Maybe you should post in the WebGrid forum and see if there is a better way.
I found the solution myself (Please note SortIndicator is must to specify to meke it work)
' Sort by Product Name
UgOpportunities.Columns.FromKey("ProductName").SortIndicator = Infragistics.WebUI.UltraWebGrid.SortIndicator.Ascending
UgOpportunities.Columns.FromKey("MinBandValue").SortIndicator = Infragistics.WebUI.UltraWebGrid.SortIndicator.Ascending
I am not sure on how to provide 2nd column. Any Sample code will help....
Just do the same thing adding another column to the collection.
Nick