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. Image for the cookie policy date
close icon

GGC: QueryColWidth nested tables

Hello, I am using the grid grouping control to display nested tables. I need to resize the columns to a prescribed width. In order to do this I need to know the table descriptor that the QueryColWidth event is firing for. I am binding the event to DataGrid.TableModel.QueryColWidth. Unlike the querycellinfo event the event object doesn't contain a tablecellidentity property so instead I tried to back the tabledescriptor out of the sender using :

Dim tm As Syncfusion.Windows.Forms.Grid.Grouping.GridTableModel = CType(sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableModel)

If Not tm Is Nothing Then

Dim td As Syncfusion.Windows.Forms.Grid.Grouping.GridTableDescriptor = tm.Table.TableDescriptor

If Not td.Name Is Nothing Then
...

But this alway returns the top level tabledescriptor. Is it possible to get the Tabledescriptor information for which the QueryColWidth event relates???




2 Replies

DE DuplicateDanny Evans August 20, 2008 02:51 PM UTC

Resolved the issue by refering to a sample in an earlier post: http://www.syncfusion.com/support/forums/message.aspx?MessageID=51218

Instead of setting a single event handler I added an event handler for each table

AddHandler DataGrid.GetTableModel(strTablename).QueryColWidth, AddressOf Me.DataGrid_QueryColWidth

Thanks



SR SubhaSheela R Syncfusion Team August 25, 2008 04:13 AM UTC

Hi Dan,

Thanks for your update.

We are glad to know that you got the solution. Please feel free to open new one if you have any other concern.

Regards,
Subhasheela R


Loader.
Live Chat Icon For mobile
Up arrow icon