Reputation: 33
I use this code to add a checkbox column to radgrid.In my program,i want to add row dynamically.but when i use my code and run program,checkbox is disabled for user and he/she can not changed it.what should i do to allow user that cand change checkbox?
my code:
<telerik:GridCheckBoxColumn DataField="Discontinued" HeaderText="Discontinued"
DataType="System.Boolean" ShowFilterIcon="False">
</telerik:GridCheckBoxColumn>
and dynamically add rows:
DataTable table = new DataTable();
table.Columns.Add("DeliveryID");
table.Columns.Add("DeliveryName");
DataRow dr = table.NewRow();
dr["DeliveryName"] = "uk";
table.Rows.Add(dr);
DataRow dr2 = table.NewRow();
dr2["DeliveryName"] = "US";
table.Rows.Add(dr2);
RadGrid1.DataSource = table;
RadGrid1.Rebind();
Upvotes: 0
Views: 4827
Reputation: 96
The GridCheckBoxColumn
can only be checked/unchecked when the grid is in edit mode. There is already a great deal of information out there to answer your question. Try these to start:
Upvotes: 1