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

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -