Hi,
Here I have one radgrid in which I have two boundcolumns and others are I have added dynamically at runtime "GridTemplateColumn" from code behind. In which I have added one check box control in ItemTemplate. Here also I have one save button outside of the radgrid. Now when I am clicking on that save button I can not getting that checkbox added dynamically in columns on click of save button. please assist me for the same.
Adding columns like:
Here I have one radgrid in which I have two boundcolumns and others are I have added dynamically at runtime "GridTemplateColumn" from code behind. In which I have added one check box control in ItemTemplate. Here also I have one save button outside of the radgrid. Now when I am clicking on that save button I can not getting that checkbox added dynamically in columns on click of save button. please assist me for the same.
Adding columns like:
GridTemplateColumn templateColumn = new GridTemplateColumn();
templateColumn.ItemTemplate = new MyTemplate(obj.Name.ToString());
templateColumn.DataField = obj.ActionMenuID.ToString();
templateColumn.HeaderText = obj.Name;
templateColumn.UniqueName = obj.Name;
radgrid1.MasterTableView.Columns.Add(templateColumn);
class MyTemplate : ITemplate <- Class called at the time of above column creation to generate checkbox under the itemtemplate
public void InstantiateIn(System.Web.UI.Control container)
{
checkBox = new CheckBox();
checkBox.ID = colname;
container.Controls.Add(checkBox);
}
Now how to get this checkbox on click of save button?
Thanks you,
Regards,
Kaushal Jani