We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

GridDataBoundGrid Header and Sorting Questions

I've tried to set a column header title in a GridDataBoundGrid with no luck. What is the correct procedure? Also, is there a flag that can be set to turn off sorting on a column?

3 Replies

AD Administrator Syncfusion Team January 21, 2003 10:16 PM UTC

You can turn off the sorting with this.gridDataBoundGrid1.SortBehavior = GridSortBehavior.None; If you have added GridBoundColumns to your grid, you can set the HeaderText property for the particular column. If you haven't added GridBoundColumns, you can use the Binder.InternalColumns in a similar manner. this.gridDataBoundGrid1.Binder.InternalColumns[1].HeaderText = "col2 header";


KJ Kenneth Johnson January 22, 2003 10:41 AM UTC

Both of the answers worked, but I was trying to turn sorting off for one column and allow for the rest. Is this possible?


AD Administrator Syncfusion Team January 22, 2003 04:50 PM UTC

One way to avoid sorting a particular columns is to derive from GridDataBoundGrid, and override either OnCellClick or OnCellDblClick depending on how you are sorting. If you look at this forum thread, there is code that that places a chceckbox in a header column. The thread also discusses how to avoid teh sorting of that column. http://www.syncfusion.com/forums/message.asp?MessageID=2427

Loader.
Live Chat Icon For mobile
Up arrow icon