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

ColumnHeader text of selected cell had problem if visible column removed

Thread ID:

Created:

Updated:

Platform:

Replies:

71387 Jan 29,2008 02:42 PM UTC Feb 9,2008 10:11 AM UTC Windows Forms 5
loading
Tags: GridControl
harisan
Asked On January 29, 2008 02:42 PM UTC

Hello,

I tried this suggestion in other forum and it did not work fine if there are visible column(s) removed.
Please advise me how to get it worked correctly with Column indexing.

Dim Field As Integer = e.TableControl.TableDescriptor.ColIndexToField(e.Inner.ColIndex)
MsgBox(e.TableControl.TableDescriptor.Columns(Field).HeaderText)

Thanks and Best Regards,
Harry


Sri Rajan [Syncfusion]
Replied On January 30, 2008 12:19 AM UTC

Hi Harry,

please refer to the attached sample, that shows header text after removing a column.

http://websamples.syncfusion.com/samples/Grid.Windows/F71387/main.htm

Please let me know if this helps.

Regards,
Srirajan


harisan
Replied On January 30, 2008 04:39 AM UTC

Dear SriRajan,

Thanks for your assist.
It works fine with your sample since it is use single table. It didn't work as expected if there is childtable relation as in our sample project.

Kindly check out the file attached in Concurrency error in GridGroupingControl by Haneef forum, hope that you will understand and find out how to fix the bug?

Best Regards,
Harry


Sri Rajan [Syncfusion]
Replied On January 30, 2008 05:26 PM UTC

Hi Harry

Thank you for your continued interest in Syncfusion products.

please refer to the attached sample, that shows header text after removing a column in Master Detail Form.

http://websamples.syncfusion.com/samples/Grid.Windows/71387/main.htm

Please let me know if this helps.

Regards,
Srirajan



harisan
Replied On February 1, 2008 01:05 PM UTC

Hi Srirajan,

I hope you will check out the sample code so that you can figure out the colindex problem. I have file submitted in Subject: Concurrency error in GridGroupingControl

Haneef proposed a code that seems good but I got InvalidCastException

Private Sub gridGroupingControl1_TableControlCellClick(ByVal sender As Object, ByVal e As GridTableControlCellClickEventArgs)
Dim cm As CurrencyManager = e.TableControl.Table.GetCurrencyManager()
Dim dv As System.Data.DataView = cm.List --> error on this line

So far the problem have not been resolved yet.
Pls advise.

Thanks and Regards,
Harry


Jeba S [Syncfusion]
Replied On February 9, 2008 10:11 AM UTC

Hi Harry,

You can use the GetHeaderColumnDescriptorAt to retrieve the HeaderText and see if it avoids the error.


Private Sub gridGroupingControl1_TableControlCellClick(ByVal sender As Object, ByVal e As GridTableControlCellClickEventArgs)
Dim style As GridTableCellStyleInfo = CType(Me.gridGroupingControl1.TableModel(e.Inner.RowIndex, e.Inner.ColIndex), GridTableCellStyleInfo)
Dim table As GridTable = style.TableCellIdentity.Table
Dim column As GridColumnDescriptor = table.GetHeaderColumnDescriptorAt(style.TableCellIdentity.ColIndex)
MessageBox.Show(column.HeaderText)
End Sub


Regards,
Jeba.


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

;