Ok I've a question for you then. Do you know that your datagrid will always be filled with that table? If so you can make a
strongly typed dataset and add it to your designer view. From there you can set the datagrid's
DataSource and
DataMember to the
typed dataset and its
Table. When you do this the designer creates the columns that will be used when the table is actually filled. The way that you are useing this is done at run time. If done at design time it is a bit easier to modify certain things. Such as making a custom link.
Now back to your question. The columns that the designer makes includes the line
<%# DataBinder.Eval(Container.DataItem,"price","Page2.aspx?id={0}"
%>'
. What this does is bind the column to some data. Databinder is a .Net framework function that does this using the Enumerable interface. (loops through an array of data) The container bit is where the data comes from. In this case the container of the control this line is for. Ummm ... ya here we go, this is a complete line of html that binds a column to the data
<asp:TemplateColumn HeaderText="Value">
<ItemTemplate>
<asp:TextBox id=txtValue runat="server" Text='<%# FormatStats(DataBinder.Eval(Container, "DataItem.USER_MULTIPLIER"
) %>' Width="29px">
</asp:TextBox>
</ItemTemplate>
Oh yes, You'll need to make the link column a template column. You can then edit that template to do what you wish. Jus sec I'll go find a good tutorial instead of trying to write everything down. Here we are.
It's like nine parts so you can skip to the part that you need to look at. If I haven't already answered the question. Sorry to be so long winded. My fingers are fresh and feel like typing haha.
PS. The italicized words, if you are unsure of them just type them into the VS help or at MSDN if you don't have VS.
That'l do donkey, that'l do
![[bravo] [bravo] [bravo]](/data/assets/smilies/bravo.gif)
Mark
If you are unsure of forum etiquette check here faq796-2540