Dear all,
I have below code but find that the sorting does not work. Do you know why??
private void dtgPromotionReportList_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { UltraGridLayout layout = e.Layout; UltraGridBand band = layout.Bands[0]; UltraGridOverride ov = layout.Override; ov.HeaderClickAction = HeaderClickAction.SortMulti; band.SortedColumns.Add("EMPLOYEE_NAME", false); band.SortedColumns.Add("PLU", false); }
What's wrong with the header?
Your code here refers to the columns keys and those aren't matching up to the column captions you have shown in this screen shot, so I cannot tell if the sort indicators are on the correct columns. Are you saying these are the wrong columns?
If that's the case, then something else in your code must be changing the sort indicators after the code you have posted here.
It works but there is something shown wrong on the header.
Please find below screen??
Hi,
I tried this out and it worked fine for me.
Can you be a little more specific about what "does not work?"
Is your grid data sorted by only one column? Or no columns?
Do the column headers display the sort icons correctly?
If you put a button on the form and examine the SortedColumns collection, does it contain both columns?
I want the sorting criteria is
(1) EMPLOYEE_NAME
(2) PLU