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

Grid Control

Thread ID:





434 Jun 26,2002 12:00 AM UTC Jun 27,2002 12:34 AM UTC WinForms 4
Tags: GridControl
Sam Horton
Asked On June 26, 2002 12:00 AM UTC

For a Grid, how do I programmatically control the Column headers (replace the A-Zs)?

Clay Burch [Syncfusion]
Replied On June 26, 2002 10:12 AM UTC

> For a Grid, how do I programmatically control the > Column headers (replace the A-Zs)? > > In Essential Grid, you can view the column headers as row zero. So, if you want col header 1 to have the header "Price", you can set the Text property for the style of cell 0,1 to "Price". gridControl1[0,1].Text = "price"; or in VB, gridControl(0,1).Text = "price"

Sam Horton
Replied On June 26, 2002 11:55 AM UTC

Thanks - Great tip! I also have a GridDataBoundGrid, but the object is quite different. For that type of control, how does one programmatically: (a) Set column text (b) Make the grid read-only (c) Freeze a column or row (d) Apply styles to cells, columns and rows If these are operations only possible in the Grid let me know and I'll use it instead.

Clay Burch [Syncfusion]
Replied On June 26, 2002 05:11 PM UTC

The GridDataBoundGrid is more of a column oriented grid. To set column properties, you can use the designer and work with the GridBoundColumns property. Using the editor, add a GridBoundColumn for each of your columns. Make sure you set the MappingName for each column so the column can be matched to the datasource. You can also set style properties for each column here as well. So, GridDataBoundGrid is basically a column centric grid, but you can do special things with events to catch specific cell appearance if needed.

Sam Horton
Replied On June 27, 2002 12:34 AM UTC

Thank you, Clay!


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