This is a migrated thread and some comments may be shown as answers.

CheckBoxList in DetailTables

2 Answers 76 Views
Grid
This is a migrated thread and some comments may be shown as answers.
K. R.Murthii
Top achievements
Rank 1
K. R.Murthii asked on 03 May 2013, 01:47 PM
HI I want to place CheckBoxList in DetailTables and populate CheckBoxList 
with data can any body help me.
This is urgent.


Thanks

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 06 May 2013, 05:26 AM
Hi,

Try the following code.
aspx:
<DetailTables>
  <telerik:GridTableView Name="DetailTable1" AutoGenerateColumns="false">
     <Columns>
       <telerik:GridTemplateColumn UniqueName="temp" HeaderText="ERROR CAUSES">
         <ItemTemplate>
           <asp:CheckBoxList ID="CheckBoxList1" runat="server" ></asp:CheckBoxList>
        </ItemTemplate>
      </telerik:GridTemplateColumn>
    </Columns>
  </telerik:GridTableView>
</DetailTables>
c#
protected void Radgrid1_ItemDataBound(object sender, GridItemEventArgs e)
{
        if (e.Item is GridDataItem && e.Item.OwnerTableView.Name == "DetailTable1")
        {
            GridDataItem item = (GridDataItem)e.Item;
            CheckBoxList list = (CheckBoxList)item.FindControl("CheckBoxList1");
             //populate list here
        }
}

Thanks,
Shinu
0
K. R.Murthii
Top achievements
Rank 1
answered on 06 May 2013, 10:43 AM
Sorry this is working fine.
Thanks a lot.
Tags
Grid
Asked by
K. R.Murthii
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
K. R.Murthii
Top achievements
Rank 1
Share this question
or