Error Name "Your application CheckBox does not contain a definition for Checked" when I try to check the selected item in gridview asp.net C# -
Error Name "Your application CheckBox does not contain a definition for Checked" when I try to check the selected item in gridview asp.net C# -
error name "your application checkbox not contain definition checked" when seek check selected item in gridview asp.net c#
this c# code
foreach (gridviewrow row in grditemlist.rows) { if (row.rowtype == datacontrolrowtype.datarow) { checkbox chkrow=(row.cells[1].findcontrol("chkselect") checkbox); if (chkrow.checked == true) { string item = row.cells[2].text; string unitprice = (row.cells[3].findcontrol("lblunitprice") label).text; dt.rows.add(item, unitprice); } } }
thanks in advance
humm! please check next things first.
are binding grid on pageload?if yes, set in "if(!page.ispostback){bindgrid}". ensure value “chkrow” not null.hope help you.
asp.net gridview checkbox
Comments
Post a Comment