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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridDataBoundGrid Header and Sorting Questions

Thread ID:





2456 Jan 21,2003 05:38 PM UTC Jan 22,2003 04:50 PM UTC WinForms 3
Tags: GridControl
Kenneth Johnson
Asked On January 21, 2003 05:38 PM UTC

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?

Administrator [Syncfusion]
Replied On 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";

Kenneth Johnson
Replied On 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?

Administrator [Syncfusion]
Replied On 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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon