Hi,
This is sridhar,i m adding checkbox controls dynamically in asp.net gridview like this
CheckBox cb = new CheckBox();
cb.EnableViewState = true;
cb.ID = "chkbox" ;
GridView1.Rows[j].Cells[mcount].Controls.Add(cb);
and i want to access that checkbox is checked or not on button click event....
Any one Help me...
With Regards
S.Sridhar
Manas MohapatraPosted Aug 15, 2015, 9:06 AM
sri darPosted Aug 15, 2015, 2:04 AM
Vicky BhattPosted Aug 15, 2015, 1:06 AM
RowDataBoundis just triggered when you databind theGridViewwhat is done typically onlyif(!IsPostBack)(at the first time the page loads).You should create dynamic controls in
RowCreatedinstead which is called on every postback. You can databind these controls then inRowDataBoundif you want, sinceRowCreatedis triggered first.sri darPosted Aug 14, 2015, 11:25 AM
Manas MohapatraPosted Aug 14, 2015, 11:12 AM