ColumnHeader text of selected cell had problem if visible column removed
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
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
SIGN IN To post a reply.
5 Replies
SR
Sri Rajan
Syncfusion Team
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
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
HA
harisan
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
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
SR
Sri Rajan
Syncfusion Team
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
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
HA
harisan
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
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
JS
Jeba S
Syncfusion Team
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.
Regards,
Jeba.
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.
SIGN IN To post a reply.
- 5 Replies
- 3 Participants
-
HA harisan
- Jan 29, 2008 02:42 PM UTC
- Feb 9, 2008 10:11 AM UTC