A
Andy
Hello,
I'm trying to add a button or a text link(Either will do) to the end of a
row in a GridView. Then for this button to call a function from the CS file
attached to it. I know this can be done with a normal ASP button through
<asp:Button OnClick="FunctionName"></asp:Button>
However, the button and link functions for the GridView control don't seem
to have the OnClick functionality.
Is there any way this can be done?
// ----- Code -----
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="AssignmentDatabase" Width="491px">
<Columns>
<asp:ImageField DataAlternateTextField="imageLocation"
DataImageUrlField="imageLocation">
</asp:ImageField>
<asp:BoundField DataField="itemID" HeaderText="itemID"
SortExpression="itemID" />
<asp:BoundField DataField="itemName" HeaderText="itemName"
SortExpression="itemName" />
<asp:BoundField DataField="price" HeaderText="price"
SortExpression="price" />
<!-- Link here -->
</Columns>
</asp:GridView>
// ----- End Code -----
Thanks,
Andy
I'm trying to add a button or a text link(Either will do) to the end of a
row in a GridView. Then for this button to call a function from the CS file
attached to it. I know this can be done with a normal ASP button through
<asp:Button OnClick="FunctionName"></asp:Button>
However, the button and link functions for the GridView control don't seem
to have the OnClick functionality.
Is there any way this can be done?
// ----- Code -----
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataSourceID="AssignmentDatabase" Width="491px">
<Columns>
<asp:ImageField DataAlternateTextField="imageLocation"
DataImageUrlField="imageLocation">
</asp:ImageField>
<asp:BoundField DataField="itemID" HeaderText="itemID"
SortExpression="itemID" />
<asp:BoundField DataField="itemName" HeaderText="itemName"
SortExpression="itemName" />
<asp:BoundField DataField="price" HeaderText="price"
SortExpression="price" />
<!-- Link here -->
</Columns>
</asp:GridView>
// ----- End Code -----
Thanks,
Andy