Advertisement
Advertisement
| 04.26.2008 at 04:44AM PDT, ID: 23355713 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: |
<asp:GridView id="gvSubscribedServices" runat="server
AutoGeneratedColumns="false" DataSourceID="dsSubsSvc" DataKeyNames="ikCustomer,ikService" OnRowCommand="ActualSvcCmd">
<columns>
<asp:boundfield DataField="sProductCode" HeaderText="Product" />
<asp:boundfield DataField="sProductDesc" HeaderText="Description" />
<asp:boundfield DataField="nNormPrice" HeaderText="Normal Price" />
<asp:boundfield DataField="nDiscPrice" HeaderText="DiscountPrice" />
<asp:TemplateField>
<ItemTemplate>
<asp:Button ID="DoAction1" runat="server" Text="Action1" CommandName="Action1" CommandArgument='<%# Eval("iKey") %>'
<asp:Button ID="DoAction2" runat="server" Text="Action2" CommandName="Action2" CommandArgument='<%# Eval("iKey") %>'
<asp:Button ID="DoAction3" runat="server" Text="Action3" CommandName="Action3" CommandArgument='<%# Eval("iKey") %>'
</ItemTemplate>
</asp:TemplateField>
</columns>
</asp:GridView>
CODE BEHIND FILE...
Protected Sub ActualSvcCmd(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs)
Dim ikService, ikCustomer As Long
ikCustomer = ddlCompany.SelectedItem.Value
ikService = e.CommandArgument.ToString()
' HERE I NEED THE ROW TO BE SELECTED FIRST,
' THEN DO ANY ACTION IN THE FOLLOWING SELECT...CASE
Select Case e.CommandName
Case "Action1"
Case "Action2"
Case "Action3"
End Select
End Sub
|