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

Grid Sorting, Part II

Thread ID:

Created:

Updated:

Platform:

Replies:

2973 Feb 24,2003 10:35 AM Feb 25,2003 09:17 AM Windows Forms 3
loading
Tags: GridControl
Ivan Pelly
Asked On February 24, 2003 10:35 AM

Hi - I set Grid.SortBehavior = GridSortBehavior.None, but I still get that little triangle in the column header if the underlying datatable happens to be sorted on a single column. Is there a way to turn that indicator off? Thanks!

Administrator [Syncfusion]
Replied On February 24, 2003 10:42 AM

This is not default behavior. Can you post a sample showing what you are doing?

Ivan Pelly
Replied On February 25, 2003 08:14 AM

Sure. I put a GridDataBoundGrid on a form, create a datatable, and bind as follows: SqlDataAdapter1.Fill(DataSet11) Dim gbColumn As GridBoundColumn Dim col As DataColumn For Each col In DataSet11.Tables(0).Columns gbColumn = New GridBoundColumn() gbColumn.HeaderText = col.ColumnName gbColumn.MappingName = col.ColumnName gbColumn.StyleInfo.CellType = "Static" gbColumn.ReadOnly = True GridDataBoundGrid1.GridBoundColumns.Add(gbColumn) Next GridDataBoundGrid1.SortBehavior = GridSortBehavior.None DataSet11.Tables(0).DefaultView.Sort = "SiteName" GridDataBoundGrid1.DataSource = DataSet11.Tables(0) The grid comes up with the little "up" triangle in the SiteName column header. If I comment out that line, no triangle.

Administrator [Syncfusion]
Replied On February 25, 2003 09:17 AM

Try setting GridDataBoundGrid1.BaseStylesMap("Column Header").StyleInfo.CellType = "Header"

CONFIRMATION

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.

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.

;