G
George Durzi
I have to LinkButtons in a DataGrid, and each of them has a Command="Select"
attribute set up.
When either of hte LinkButton's is clicked, I want the proper row in the
DataGrid to be selected, but I then want to do a different operation
depending on which LinkButton was clicked.
Here's some of the Html out of my DataGrid
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="lnkViewEdit" Runat="server" CommandName="Select"
CausesValidation="false" Text="View"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Status">
<ItemTemplate>
<asp:LinkButton ID="lnkStatus" Runat="server" CommandName="Select"
CausesValidation="False" Text='<%# DataBinder.Eval(Container,
"DataItem.Status")%>' OnClick="lnkStatus_OnClick"/>
</ItemTemplate>
</asp:TemplateColumn>
In my dgIssues_OnSelectedIndexChanged DataGrid event, I can't see a way to
figure out a way to find out which LinkButton raised the event.
I tried adding an OnClick event to my second LinkButton, lnkStatus. When
debugging I realized that this event is called BEFORE the
dgIssues_OnSelectedIndexChanged event. I wanted to do the custom operation
if the second LinkButton was clicked AFTER the
dgIssues_OnSelectedIndexChanged event was called.
Thanks in advance for any help or tips.
attribute set up.
When either of hte LinkButton's is clicked, I want the proper row in the
DataGrid to be selected, but I then want to do a different operation
depending on which LinkButton was clicked.
Here's some of the Html out of my DataGrid
<asp:TemplateColumn>
<ItemTemplate>
<asp:LinkButton ID="lnkViewEdit" Runat="server" CommandName="Select"
CausesValidation="false" Text="View"/>
</ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn HeaderText="Status">
<ItemTemplate>
<asp:LinkButton ID="lnkStatus" Runat="server" CommandName="Select"
CausesValidation="False" Text='<%# DataBinder.Eval(Container,
"DataItem.Status")%>' OnClick="lnkStatus_OnClick"/>
</ItemTemplate>
</asp:TemplateColumn>
In my dgIssues_OnSelectedIndexChanged DataGrid event, I can't see a way to
figure out a way to find out which LinkButton raised the event.
I tried adding an OnClick event to my second LinkButton, lnkStatus. When
debugging I realized that this event is called BEFORE the
dgIssues_OnSelectedIndexChanged event. I wanted to do the custom operation
if the second LinkButton was clicked AFTER the
dgIssues_OnSelectedIndexChanged event was called.
Thanks in advance for any help or tips.