Hi,
I Have xamdatagrid it contains the collection of Customer records.
it is bind with customerList
Ex: List<Customer>CustomerList = new List<Customer>();
i have binded the "CustomerList" to xamdatagrid.
my problem is: i have selected 3 records and click on one button i need to get the record type as Customer.
i am unable to type cast the selected records to customer.
Thanks in advance,
Hello,
You can get the item in the cell as its type when getting the DataRecord ( the 3 you have selected ) and casting its DataItem property to the desired type.
DemoCustomer demoCustomer = dataRecord.DataItem as DemoCustomer;
Hope this helps.