I've googled quite a lot, but couldn't find a solution - in the end this forum always helped me out the best! :)
This is my problem: I've got my Gridview gv_1, it gets its data from the code behind through a DataSet, gets generated like it should be, and assigns it's column-width to the longest entry in the datarow. Now I've got my Gridview gv_2, which has other entries and column widhts (gets filled the same way) - what I want to do is to change the width of the columns that the gridviews have the same overall width.
I've uploaded a screenshot: http://stepdown.elementfx.com/image16.jpg
What I've already tried is playing around with the GridView.HeaderRow.Cells.Width-Property, but when I debug it (after it's DataBound) I've got no values, meaning the values are "0.0" etc. The try to assign a value also didnt work (not directly for Width and not for Width.Value).
The next problem I could encounter is that my second GridView has no visible HeaderRow - and as far as I've googled people always somehow set the width of the column - but I'm not even that far yet. ;)
So the perfect solution (working in my head at least) would be to get the width of each column from the 2 gridviews, pick the larger one, and assign this width to both gridviews. I want to avoid fixed column widths if possible, because the gridviews get lots of columns, and I don't want to waste precious space. In the end there will be more GridViews (~10-20 I guess..), but when it's working for 2 GVs, I'll get it done for more aswell.
Any help appreciated, if you need further information or code (aspx or aspx.cs) don't hesitate to ask.
Thanks a lot in advance!