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.
Syncfusion Feedback

Retrieving Column header text

Thread ID:

Created:

Updated:

Platform:

Replies:

68457 Sep 21,2007 04:43 PM Sep 26,2007 04:37 AM Windows Forms 3
loading
Tags: GridControl
Eric Carley
Asked On September 21, 2007 04:43 PM

I am sure this is probably just a syntax mistake. But I just want the column header text. Both of these lines of code return a blank text
note: cCell => currentcell

mytextbox.Text = grid.Text & "!" & grid(0, cCell.ColIndex).CellValue & cCell.RowIndex

mytextbox.Text = grid.Text & "!" & grid.ColStyles(cCell.ColIndex).Text & cCell.RowIndex

the grid text and the row index are correct, but the column header text is not being returned. Anybody have any ideas?

Thanks folks for the feedback!

Pratima
Replied On September 21, 2007 06:47 PM

Try :
grid.Binder.InternalColumns[cCell.ColIndex].HeaderText

>I am sure this is probably just a syntax mistake. But I just want the column header text. Both of these lines of code return a blank text
note: cCell => currentcell

mytextbox.Text = grid.Text & "!" & grid(0, cCell.ColIndex).CellValue & cCell.RowIndex

mytextbox.Text = grid.Text & "!" & grid.ColStyles(cCell.ColIndex).Text & cCell.RowIndex

the grid text and the row index are correct, but the column header text is not being returned. Anybody have any ideas?

Thanks folks for the feedback!

Eric Carley
Replied On September 21, 2007 08:24 PM

I am sorry, but I should have stated that this is an unbound grid. I cannot find any documentation on binding.internalcolumns on unbound grids. If I have missed something, please let me know.

Thank you for the feedback - but do you have any other ideas?

Jisha Joy [Syncfusion]
Replied On September 26, 2007 04:37 AM

Hi Eric,

Thank you for posting your query to us.

1,Regarding the Column header
................

I am afraid that I was not able to reproduce the issue.I have created a simple sample to test this issue and is working fine.
Here is the code snippet:

Me.TextBox1.Text = Me.GridControl1.Text & "!" & Me.GridControl1(0, Me.GridControl1.CurrentCell.ColIndex).CellValue & Me.GridControl1.CurrentCell.RowIndex


Please refer the following sample that illustates the same :
http://websamples.syncfusion.com/samples/Grid.Windows/68457/main.htm

Please have a look at the above sample and if still the issue exists, could you please try reproducing it in the above sample or send us the reproducing steps so that we could sort out the cause of the issue
and provide you a solution?

2, Regarding how to bind an external datasource
...................

Please refer the following Browser samples that shows how to virtually bind an external datasource to gridcontrol:
C:\Documents and Settings\{username}\My Documents\Syncfusion\EssentialStudio\5.2.0.25\Windows\Grid.Windows\Samples\2.0\VirtualGrid

Let me know if you have any questions.

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.

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

;