Question

i am trying to get datarow from aspxgridview but it says

Cannot convert type 'object[]' to 'System.Data.DataRow'

code i tried is

 DataRow dr = (DataRow)ASPxGridView1.GetRowValues(i, "ID", "School ID", "Name", "Type", "DOB", "Cell", "Guardian Cell");

&&

DataRow dr = (DataRow)ASPxGridView1.GetRow(i);
Was it helpful?

Solution

You should be calling GetDataRow, that will return you a DataRow - the methods you are calling just now return object (which probably just wrap up object[]).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top