Column Width as Percentage

3 replies. Last post: September 23, 2009 9:52 PM by Glenn Layaar
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback

Hi,

I am currently trying to set individual grid column widths to specific percentage using the following code: 

grid.Columns.GetNamedItem("Title").Width = Unit.Percentage(75);

When i use this on any of the webgridcolumns it just hides the column from the layout, However if i manually go into the webgridlayout xml and add in the percentage values directly to the xml it works.  How can i do this in code?

All times are GMT -5. The time now is 11:56 PM.
Previous Next