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

Radgrid_EditItem Checkboxlist

1 Answer 49 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Shawn Caulder
Top achievements
Rank 1
Shawn Caulder asked on 30 Apr 2010, 04:52 PM
I am trying to create a checkbox list in a radgrid.  I get it to populate, but the problem I am having is updating the field in the database as well as checking the values of the fields of the column in the db table to set the boxes to be checked when the edit button is clicked.  Any suggestions?

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 03 May 2010, 08:46 AM
Hello Shawn,

Here is the part of code in my application, where I used CheckBoxList in EditItemTemplate. Give a try with following approach.

ASPX:
 
<telerik:GridTemplateColumn> 
     <ItemTemplate> 
        <%# Eval("Country")%> 
    </ItemTemplate> 
    <EditItemTemplate> 
        <asp:CheckBoxList ID="CheckBoxList1" runat="server" DataSourceID="SqlDataSource2" 
            DataValueField="Country" SelectedValue='<%# Bind("Country") %>' DataTextField="Country"
        </asp:CheckBoxList> 
    </EditItemTemplate> 
</telerik:GridTemplateColumn> 

Please do not hesitate to write again if you experience any problem in implementing this.

Shinu.
Tags
Ajax
Asked by
Shawn Caulder
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or