datakeynames in gridview

BasseDK

New Member
i have gridview having a \[code\] DataKeyNames="FilterId,ItemId"\[/code\]field.How can i get each values in both fields in \[code\] gdv_RowEditing \[/code\]event.i tried\[code\] protected void gdv_RowEditing(object sender, GridViewEditEventArgs e) { string a = gdv.DataKeys[e.NewEditIndex].Value[0].ToString(); string b = gdv.DataKeys[e.NewEditIndex].Value[1].ToString(); }\[/code\]but it shows error like\[code\]'cannot apply indexing with [] to an expression of type object'\[/code\]
 
Back
Top