Hi,
I have a datagrid which is populated by a dataset. I have a column
containing LinkButton that passes MyID and fires my event handler...
....
<ItemTemplate>
<asp:LinkButton id="btnEdit" CommandName="GoToEditPage"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MyId")%>'
runat="server" Text="Edit"/>
</ItemTemplate>
....
My problem is that I need to assign another value to CommandArgument
(MySecondID, which exists in the dataset). How can I achieve this?
I have some ideas, such as :
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "MyId") + ";" +
DataBinder.Eval(Container.DataItem, "MySecondId")%>'
and seperate the values by a function
or set another invisible column in my datagrid and get the value of the cell
which will contain MySecondID.
But I thought it might be a better way.
Any ideas?
Kind Regards
Mehdi