Hi,
I have a wingrid which is databound to a datacontract class. We hide the activeFlag column, and instead show a status column, which is a button. I can sort on any column in the grid as per default behavior, however the action column doesn't show the sort indicator. What setting am I missing?
Thanks.
Below is the code used to create the custom column:
Private Sub ActionColumnCreate() _statusColumnCaption = "Status" _grid.DisplayLayout.Bands(0).Columns.Add(STATUS_COLUMN_ID, _statusColumnCaption) _grid.DisplayLayout.Bands(0).Columns(STATUS_COLUMN_ID).Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Button _grid.DisplayLayout.Bands(0).Columns(STATUS_COLUMN_ID).ButtonDisplayStyle = Infragistics.Win.UltraWinGrid.ButtonDisplayStyle.Always _grid.DisplayLayout.Bands(0).Columns(STATUS_COLUMN_ID).CellButtonAppearance.Image = Global.Common.CompanyName.Library.Image.My.Resources.NewRecordIcon_32 _grid.DisplayLayout.Bands(0).Columns(STATUS_COLUMN_ID).CellButtonAppearance.FontData.Underline = Infragistics.Win.DefaultableBoolean.True _grid.DisplayLayout.Bands(0).Columns(STATUS_COLUMN_ID).CellButtonAppearance.ImageHAlign = Infragistics.Win.HAlign.Center End Sub
I don't see anything in this code that turns on the Sort Indicators for any column. Are you setting the HeaderClickAction on each column or on the band as a whole or on the grid's DisplayLayout?
I can't see any reason why any of the properties you have set here would cause the header not to show the sort indicator - assuming you are actually clicking on the column header. The indicator doesn't show up unless the column is actually being sorted, of course.
Strange. I was wondering if there was an extra setting or something. The rest of the columns are bound through databinding and when I sort on the column, the indicator shows up properly. It's only this column, which sorts no problem, however doesn't show an indicator. I figured I was missing something when I set up the column.
Thanks for the quick response.
Your right, I just spoke with another developer here who has wrapped the ultrawingrid. Apparently he hijacks the sort and does a sort on a hidden column which is why the indicator isn't showing up. Thanks for your time on this mike.
I have never seen anything like that before. If the column is actually sorting, then there's no reason I can think of why the sort indicator would not show up. There's no property on the column that could cause this. If you wanted to acheive such a thing, you'd have to use a DrawFilter or a CreationFilter to hide the sort indicator. I assume you are not doing that, since you would probably know it if you were.
Can you duplicate this in a small sample project and post it here so I can take a look?
Sorry for the delay in response. It doesn't appear to be the column width. The column being sorted is the button column at the end of the grid. I've included two screenshots to show that it is sorting. The other columns show the indicator and I made this column large before the sort to see if that was the issue. Any other ideas?
Thanks
.
So you are saying that the column is actually sorting, but it just doesn't show the sort indicator?
If that's the case, then my guess is that the column width is too small. Try making the column wider and see if that helps.