views:

49

answers:

1

alt text

Im hoping there is a "simple" way to allign all the data grids, so basicly all the colums have the same width as one another when posible ( Some of the grids have more colums then the other once ).

Is this posible to do in html,xml simply or do i need to manualy set the width of eatch colum myself?

The site is a ASP.net ( .NET 3.5 ) and is "classic" style, not MVC.

Markup can be found here on how i create the datagrids

+1  A: 

Yes it is. I usually do up my GridView starting with the overall width then calculating the width of each column and setting it declaratively in the grid markup attributes. What can throw the whole thing off is if you don't have matching widths for the headers - then it can appear that the width in the columns is not being applied. Use the RowStyle and HeaderStyle templates for this.

Is there some reason you are using DataGrids with 3.5? A sample of the markup might help :-)

IrishChieftain
Thx.I added a link to the markup. Did not want to come in the site post, guess all the markup screwed it up.
EKS
Aha! I have found sample syntax in another question on SO:http://stackoverflow.com/questions/309815/gridview-column-width-in-asp-net-2-0Let me know if this answers your question? BTW, don't use percentages for the widths :-)
IrishChieftain