Forum Discussion

savio_leitao's avatar
savio_leitao
Occasional Contributor
12 years ago

Type casting



Hi,



How to achive type casting here from Item class to Xceed.Wpf.DataGrid.DataRow



Xceed.Wpf.DataGrid.DataRow row = this._gridControl.GetContainerFromItem(item) as Xceed.Wpf.DataGrid.DataRow; 



Trying to do the below




var dataRow = dataGrid["GetContainerFromItem"](dataGrid["Items"]["Item"](matchingRow));




 


                    var dataCell = NavFind.FindChild(dataRow, new Property[] { 


                    new Property(Prop.ClrFullClassName, "Xceed.Wpf.DataGrid.DataCell"),


                    new Property(Prop.FieldName,"IsSelected")                


                    });



But it throws an execption,