Datagrid Column Width

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
 
E

Eliyahu Goldin

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top