I have addded columns and checkboxes Dynamically... But met with a problem that the CheckedChanged Event is not fired.. here is my Code..
protected void ddlRole_SelectedIndexChanged(object sender, EventArgs e)
for (int i = 0; i < DtOperation.Rows.Count; i++)
dgrDynamic.DataSource = Dt;
tcCheckCell = new TableCell();
var checkBox = new CheckBox();
checkBox.ID = DtOperation.Rows[i] + "|" + DtOperation.Rows[i];
checkBox.AutoPostBack = true;
checkBox.Checked = true;
checkBox.CheckedChanged +=new EventHandler(checkBox_CheckedChanged);
void checkBox_CheckedChanged(object sender, EventArgs e)
am a fresher in this field and can you pls help me to Over come the misery.. Thank you all
I have solved the Issue By recreating the Dynamic Controls In Page Load Event.. Now Checkboxes are Not Refreshed in Postback.. thank u All...
Because the controls are created dynamically they must be recreated during any postback before the events will fire. Check to make sure this is happening.
Edited 7-Mar-12 2:02am
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)