CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Location
    Rochester, NY USA
    Posts
    65

    DataGrid - TemplateColumn - Checkbox help needed

    hello all,
    I have a datagrid with a bunch of columns, the last column is a template column of checkboxes and the footer of the column is a button. below is the code for the column.
    Code:
    					<asp:TemplateColumn HeaderText="Request">
    	<HeaderStyle HorizontalAlign="Center"></HeaderStyle>
    	<FooterStyle HorizontalAlign=Center></FooterStyle>
    	<FooterTemplate>
    	<asp:Button Text="Request" Runat=server ID=ButtonRequest></asp:Button>
    	</FooterTemplate>
    	<ItemStyle HorizontalAlign="Center" Width="5%"></ItemStyle>				<ItemTemplate>
    	<asp:CheckBox id="CheckRequest" Runat="server" />
    	</ItemTemplate>
    	</asp:TemplateColumn>
    When the user clicks the button, I wanna know which checkboxes are checked. Thanks in advance.

    David

  2. #2
    Join Date
    May 1999
    Location
    Rochester, NY USA
    Posts
    65
    i guess asp.net code doesnt come through or some how it gets filter.

  3. #3
    Join Date
    Nov 2002
    Location
    Seoul
    Posts
    13
    Hi,
    You should use a loop to check

    For i = 1 to Datagrid.Row.count
    if (Checkbox.value) is Null then
    End if
    Next

    Hope this help

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured