Controls in certain cells in a grid

J

Jeremy Chapman

I have a grid with several fields an many records. For fields that have a
large amount of text in them, I want to show a button that the user can
click which will show them the contents of the field in a seperate page, or
seperate control. How can I do this?
 
A

Alvin Bruney

in your itemdatabound event handler add a hyperlink control to the
appropriate page.
HyperLink tb = new HyperLink();

tb.ForeColor = Color.Blue;

tb.Text = "Invalid";

tb.Font.Size = FontUnit.XXSmall;

tb.NavigateUrl = "Invalid.aspx";

e.Item.Controls[e.Item.Cells.Count - 1].Controls.Add(tb);

tb = null;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top