How do I list item in a templatecolumn?

Discussion in 'ASP .Net Datagrid Control' started by jm, Nov 3, 2003.

  1. jm

    jm Guest

    I have a pushbutton in templatecolumn in a DataGrid. I can iterate
    through some of the rows in the datagrid with:

    sub alert_inactive(sender As Object, e As DataGridCommandEventArgs)
    dim item as datagriditem

    For Each item In sender.Items
    response.write("<br>The answer is: <BR>" & item.Cells(1).Text & " " &
    item.Cells(2).Text & " " & item.Cells(3).Text)
    Next item
    end sub

    However, in the DataGrid there is this:

    <asp:TemplateColumn HeaderText="Completed"
    ItemStyle-HorizontalAlign="Center">
    <ItemTemplate>
    <asp:button id="butCompleted" causesvalidation="false"
    text="Completed?" commandname="Delete" Runat="server" />
    </ItemTemplate>
    </asp:TemplateColumn>
    <asp:TemplateColumn HeaderText="Completed"
    ItemStyle-HorizontalAlign="Center">
    <ItemTemplate>
    <asp:button id="butChecked" commandname="Delete"
    causesvalidation="false" text="Checked?" Runat="server" />
    </ItemTemplate>
    </asp:TemplateColumn>

    I cannot figure out how to get the ID of these two buttons in this
    function.

    Thank for any help.
     
    jm, Nov 3, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ssoss

    Display Related Item or Add Item

    ssoss, Sep 17, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    502
    ssoss
    Sep 19, 2003
  2. Replies:
    2
    Views:
    630
  3. root

    item[LENGTH] vs. *item and malloc()

    root, Aug 21, 2003, in forum: C Programming
    Replies:
    2
    Views:
    395
    Eric Sosman
    Aug 21, 2003
  4. Steven Bethard
    Replies:
    0
    Views:
    406
    Steven Bethard
    Mar 12, 2005
  5. QUASAR
    Replies:
    6
    Views:
    435
    QUASAR
    Jan 17, 2004
Loading...

Share This Page