G
Guest
I am trying to set the width of a single column in the datagrid. What is happening is the column seems to stretch to try to accomodate the length of the data contained in it. I want to have it only x number of pixels wide and the data to wrap if necessary. I have tried several things to set the column width but it seems to ignore everything I try.
I have tried:
1. Setting the width of the grid to be 50% - still stretches across entire screen.
2. Executing e.Item.Cells(0).Width = New Unit(100) in the itemdatabound event- doesn't do anything
3. Executing e.Item.Cells(0).Width = New Unit(100) in the itemcreated event- doesn't do anything
The grid itself is contained in an html table because there are several other grids on the screen and I want to make sure they don't overlap each other.
Any ideas of what I may be doing wrong or how to make it work... If it will
Thanks
I have tried:
1. Setting the width of the grid to be 50% - still stretches across entire screen.
2. Executing e.Item.Cells(0).Width = New Unit(100) in the itemdatabound event- doesn't do anything
3. Executing e.Item.Cells(0).Width = New Unit(100) in the itemcreated event- doesn't do anything
The grid itself is contained in an html table because there are several other grids on the screen and I want to make sure they don't overlap each other.
Any ideas of what I may be doing wrong or how to make it work... If it will
Thanks