J
jm
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.
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.