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.

How to name (not bounded) gridControl''s column

Thread ID:

Created:

Updated:

Platform:

Replies:

90058 Sep 15,2009 09:37 AM Sep 17,2009 07:37 AM Windows Forms 5
loading
Tags: GridControl
Allon
Asked On September 15, 2009 09:37 AM

Hi, everyone

I'd like to know how can I name gridControl's column.
It needs to be something simple like naming column of not bounded datagridview control in microsoft V.S (something like: myGrid.Columns(2).Name = "clmMyColumnName3").

Thanks in advance :)
Allon

P.S
My bet was grdMyGrid.ColStyles(3).Name = "clmMyColumnName3", but it hadn't worked.

Jisha Joy [Syncfusion]
Replied On September 16, 2009 02:22 AM

Hi Allon,

Thank you for posting query to us.

In GridControl, you could access the columnHeader row by using the rowindex 0 and set the name using the Text property. See the code:

this.gridControl1[0, 3].Text = "Column3";

Please let me know if this does not serve your needs.

Regards,
Jisha


Allon
Replied On September 16, 2009 02:58 AM

Hi, Jisha

The line that you suggested me (this.gridControl1(0, 3).Text = "Column3") gives me information that only will be seen as an header of the column. What I really wanted to do, is naming the 3rd column, for referencing later. In V.S, when I want to reference particular column, first I name it (something like grdControl1.Columns(2).Name = "clmMy3rdColumn"), and during runtime, I reference it as grdControl1.Columns(2).Name .

Meanwhile, I've been using the Tag property, even though it's a little bit ridicules :)

Regards,
Allon

Jisha Joy [Syncfusion]
Replied On September 16, 2009 08:07 AM

Hi Allon,

GridControl is a cell oriented grid. We cannot give column Names to the grid as it is not bounded to any datasource. It is not a bounded grid like DataGridView. But our other grid controls GridGroupingControl and GridDataBoundGrid is bounded grids.
Here is a short description of each of the grids that we ship.

GridControl - This is a cell oriented grid (meaning you can set properties cell by cell). It has excel like formula support. It supports a virtual mode and is the grid of choice for light-weight, high performance applications where the main goal is to to display rapidly changing information with minimal CPU load. It is also the grid of choice for Excel like applications needing formula support. This grid when not used in virtual mode stores the displayed data in its own data structures, allowing it to support nice features like nested undo/redo out of the box.

GridListControl - This is a Windows Forms ListControl derived class that wraps a GridControl with allows you to implement code to do things that are hard to do with the Windows Forms ListControl. It really is a potential replacement for a Windows Forms ListControl if there is something you need to do with your listcontrol that the Windows Forms ListControl cannot do.

GridDataBoundGrid - This was an early grid that was intended to provide an alternative to the 1.0 Windows Forms DataGrid. It is a bound grid, and does not hold any data. It gets its values to display from an external DataSource. Currently, it serves as a light-weight grid for simple bound applications that do not require nested table support, filtering, grouping, etc.

GridGroupingControl - This is a bound grid that supports nested tables, filtering, groupings, summaries, etc. It is our most complete featured bound grid. And as such, should be considered first for any application where you want a grid to display data in a external datasource.

Please let me know if you have any specific questions.

Regards,
Jisha

Allon
Replied On September 17, 2009 03:59 AM

Hi, Jisha

Thanks for the comprehensive explanation of all your grid controls. From now on, it will be simpler to choose the correct grid.

Thanks a lot :)
Allon

Jisha Joy [Syncfusion]
Replied On September 17, 2009 07:37 AM

Hi Allon,

Thank you for your update.

Regards,
Jisha

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.

;