Datagrid Column Width

  • Thread starter Thread starter Chris
  • Start date Start date
C

Chris

Is there a way to autosize the Datagrid column widths to just a bit larger
than the data. I know how to manually size the column in code but I have a
dynamically created datagrid and it work except the data is all squeezed
together. I'd like a way to measure the text in the column and then
increase the size a little so it's easier to read.

Thanks
Chris
 
Chris,

You can simply apply padding-left and padding-right css rules to the cells.
You can access cells in either ItemDataBound or PreRender event.

Eliyahu
 
Back
Top