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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

column header

Thread ID:

Created:

Updated:

Platform:

Replies:

27905 Apr 20,2005 08:45 AM UTC Apr 20,2005 10:45 AM UTC WinForms 4
loading
Tags: GridControl
nicola
Asked On April 20, 2005 08:45 AM UTC

This is my problem, I change the default text of the Header of the columns, but if I click on the caption of the header and the whole column is selected, on caption appear the default name of the column (A,B,C etc.) How can I solve this problem? Which is the event that select the column? Thanks Nicola

Administrator [Syncfusion]
Replied On April 20, 2005 09:40 AM UTC

In a GridControl, to set column header text, you should set the style.Text of the cell in row 0. grid[0, 3].Text = "MyHeaderForCol3"; To turn off column selections when you click a header, in the grid.AllowSelecions property, remove the Columns flag.

Administrator [Syncfusion]
Replied On April 20, 2005 09:44 AM UTC

In a GridDataBoundGrid, you set teh HeaderText using the property in the GridBoundColumn for that column. ''if you have not added GridBoundColumns Me.GridDataBoundGrid1.Binder.InternalColumns("Col1").HeaderText = "header for Col1" ''if you have added GridBoundColumns Me.GridDataBoundGrid1.GridBoundColumns("Col1").HeaderText = "header for Col1"

nicola
Replied On April 20, 2005 10:14 AM UTC

I use this code for set the column header text: If e.ColIndex = 1 AndAlso e.RowIndex = 0 Then e.Style.Text = "Data Creazione" End If Even if I remove the flag in the grid.AllowSelecions property if I click on the top of the column, the caption change showing the default value. >In a GridControl, to set column header text, you should set the style.Text of the cell in row 0. > >grid[0, 3].Text = "MyHeaderForCol3"; > >To turn off column selections when you click a header, in the grid.AllowSelecions property, remove the Columns flag.

Administrator [Syncfusion]
Replied On April 20, 2005 10:45 AM UTC

Where are you using this code? In PrepareViewStyleInfo or in QueryCellinfo? Try using it in QueryCellInfo if you are using PrepareViewStyleInfo.

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.

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

;