470,561 Members | 1,913 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,561 developers. It's quick & easy.

Problem with Nested Gridview

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

Dec 30 '05 #1
0 2040

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by bigbrorpi | last post: by
reply views Thread by manuel.ricca | last post: by
3 posts views Thread by Jeff | last post: by
1 post views Thread by webby98 | last post: by
2 posts views Thread by ASF | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.