datagrid LoadingRow - get item by column not just item

Jul 3, 2009 at 8:18 AM

Hi All,

I am trying to nest a datgarid inside a DataGridTemplateColumn and am using the LoadingRow event to bind my nested datagricd (this is how i normally do nested datagrid in

the problem is i cant get the item in column 1, I can get the item in column 0 

 Car car = (Car)e.Row.Item;  works nice....

but in a second column in the same datagrid I have a nested datagrid , but i Cant see how i can say use the item in column 1 or maybe do a findcontrol()?

somethign like 

private void dataGrid1_LoadingRow(object sender, DataGridRowEventArgs e)
            Car car = (Car)e.Row.Item;
            DataGrid dg = (DataGrid)e.Row[1].Item;
            dg.ItemsSource = cm.getVehicleDataByI(car.CarID);


Thanks in advance