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 ass
View Complete Post