Hello,
How can i prevent a column from being sorted, while keeping the sorting behavior for all the other columns. I'm getting an error due to a templateDataField trying to be sorted on & I understand the grid can't sort it.
I see column setting under sorting behavior but I don't understand it & it gives me an error.
Is there a way to set a column's allowsorting = false or something like that?
Or
Do I need to code ColumnSorting javascript function, detect which column was clicked to be sorted and then set cancel = true?
Please let know if / how I can accomplish this. Also a code snippet would be great, still learning object models.
Thanks for any and all info!
Yes, you can use ColumnSettings under the Sorting behavior for this.
For example:
<igGrid:Sorting Enabled="true"><ColumnSettings><igGrid:SortingColumnSetting ColumnKey="SortableColumnKey" Sortable="true" /><igGrid:SortingColumnSetting ColumnKey="NotSortableColumnKey" Sortable="false" /></ColumnSettings></igGrid:Sorting>
Thank you very much dinoboy!
I thought that is what that was for but for some reason i got an error on 1 of my pages when I tried to do that via the properties window GUI...
Unable to cast object of type "System.ComponentModel.Design.SiteNestedContainer" to type "System.ComponentModel.Design.IDesignerhost".
But on a different page it just worked fine :)
Maybe somethign wrong with that 1 grid but everything else seems to work fine with it. I will double check that grid for issues and maybe try to add those tags manually instead of via the gui for that page.
Thanks Again!