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 05:16 PM

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 05:41 AM

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 11:50 AM

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