www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to select singe-checkbox in Grid?

  1. #1
    Join Date
    Oct 2005
    Posts
    15

    How to select singe-checkbox in Grid?

    I display data in a grid. There is a Template column contains CheckBox(not Radio) like this:

    <c1webgrid:C1TemplateColumn>
    <ItemStyle Width="3%"></ItemStyle>
    <ItemTemplate>
    <asp:CheckBox ID="chkCheck" Runat="server"></asp:CheckBox>
    </ItemTemplate>
    </c1webgrid:C1TemplateColumn>
    ..........................

    How can i make only select one checkbox?
    Thanks for any help.

  2. #2
    Join Date
    Oct 2005
    Posts
    252
    Code:
    CheckBox fstOne = (CheckBox)c1webgrid.Items[0].FindControl("chkCheck");
    
    Dim fstOne as CheckBox = c1Webgrid.Items(0).FindControl("chkCheck")
    This code will get you the first checkbox, you can use any number to select checkbox you want.

    may i ask you about this tag "</c1webgrid:C1TemplateColumn>"?!
    i need a creative atmosphere

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles