Hi,
I have a DataGrid that contains a LinkButton in the first column. When the link is clicked on, it's supposed to pass it's name to another DataGrid to show it's part of a subgroup. I've been unable to figure out how to reference the text of the link to add it to the new Grid.
I'm creating the cell like this:
In the associated dgColumns_ItemCommand action I've caught the
to add a column to the second Grid, but can't get the name of which LinkButton sent the request. I've tried...
which gives me nothing
gives me system.Web.UI.WebControls.TableCell
gives me System.Web.UI.WebControls.DataGridLinkButton
Can someone tell me the correct method of accessing the name of the link?
Thanks,
Judy
I have a DataGrid that contains a LinkButton in the first column. When the link is clicked on, it's supposed to pass it's name to another DataGrid to show it's part of a subgroup. I've been unable to figure out how to reference the text of the link to add it to the new Grid.
I'm creating the cell like this:
Code:
<asp:ButtonColumn HeaderText="Column" CommandName="SortMe" ButtonType="LinkButton" DataTextField="Column"></asp:ButtonColumn>
In the associated dgColumns_ItemCommand action I've caught the
Code:
CommandName="SortMe"
Code:
Trace.Write(e.Item.Cells(0).Text)
Code:
e.Item.Cells(0).ToString
Code:
e.Item.Cells(0).Controls.Item(0).ToString
Can someone tell me the correct method of accessing the name of the link?
Thanks,
Judy