Problem with Nested Gridview

G

Guest

Hello,

I am using ASP.NET 2.0. What I have done is nested a gridview inside
another column of a gridview using a template data field column
declaritively in my web form. Inside this child gridview I have set an
ItemStyle property of width 20% for the first templated field which
contains a hyperlink control, and an ItemStyle of width 80% for the
second templated field which contains a label. Both of these controls
are databound to columns in a dataview.

I overrode the DataRowBound event to bind the appropriate dataview to
the nested gridview for a particular row in the parent gridview - it's
my way of working with a master-detail relationship.

All of the data displays correctly, which means I am binding things
correctly. Unfortunately, the nested gridview doesn't seem to
appropriately take into consideration the widths of the columns. In
design view when I look at the nested gridview in the appropriate item
template column of the parent gridview, the column widths seem to be
split correctly at 20%/80%. However, when the data is displayed at
runtime, the column which is bound to a hyperlink control seems to take
up much more than 20% of the entire width of the nested gridview.

What am I doing wrong here, and how can I fix it so the nested gridview
splits the column widths appropriately?

Thanks.

Hammad
 

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,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top