Iterate through the datagrids Items collection and each Items Cells collection - you can then set the width of each cell. If the datagrid is anything like a table (which I suspect it is) you probably only need to set the widths of the first Items cells.
- set it at server
mygrid.Items[y].Cells[x].Attributes.Width = 50;
- add width to set in client
mygrid.Items[y].Cells[x].Attributes.Add ("width","50"
Iterate through the datagrids Items collection and each Items Cells collection - you can then set the width of each cell. If the datagrid is anything like a table (which I suspect it is) you probably only need to set the widths of the first Items cells.
- set it at server
mygrid.Items[y].Cells[x].Width = 50;
- add width to set in client
mygrid.Items[y].Cells[x].Attributes.Add ("width","50"
I was actually looking for a way to do this in the HTML in my <Columns> tag. I thought that using a Template Column would be the best way, but I can't find any decent sites showing how to set it up the way I want. Currently the column looks like this :
I was actually looking for a way to do this in the HTML in my <Columns> tag. I thought that using a Template Column would be the best way, but I can't find any decent sites showing how to set it up the way I want. Currently the column looks like this :
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.