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:LinkButt on id="btnEdit" CommandName="Go ToEditPage"
CommandArgument ='<%# DataBinder.Eval (Container.Data Item, "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.Data Item, "MyId") + ";" +
DataBinder.Eval (Container.Data Item, "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