GridDataControl: Access nested Model

Hello,

How to access to the nested Model to a determinate row?. It's for copy the selected cell of the nested grid.

Thanls


3 Replies

DM Deenadhayalan M Syncfusion Team July 29, 2011 03:28 PM UTC

Hi Jorge,

Thanks for using Syncfusion Products.

You can get the Nested Model selected row column indexes using GridDataChildTableModel selectionchanged event. This can be achieved in RecordExpanded event. From that you can get determinate row. We have prepared a model sample based on this. Please find it in the following location.

Please let us know if you have any queries.

Regards,
Deenadhayalan



NestedGrid_RowColumnIndex_cc4de594.zip


JP Jorge Pampin August 2, 2011 02:45 PM UTC

Hello,

That works fine, but in the nestedgrid it´s only possible select a row, how to configure the GridDataControl to select any range of cells?

Thanks!



DM Deenadhayalan M Syncfusion Team August 8, 2011 06:21 PM UTC

Hi Jorge,

You can achieve your requirement by setting the AllowSelection and ListBoxSelectionMode property as follows,

Code snippet [C#]:

void Table_RecordExpanded(object sender, GridDataValueEventArgs e)
{
e.Value.ChildModels[0].Options.AllowSelection = GridSelectionFlags.Cell;
e.Value.ChildModels[0].Options.ListBoxSelectionMode = GridSelectionMode.None;
}

We have prepared a sample based on this. Please find it in the following location.

Please let us know if you have any queries.

Regards,
Deenadhayalan



NestedGridDemo_83db948d.zip

Loader.
Up arrow icon