Home All Groups Group Topic Archive Search About
Author
21 Mar 2005 3:49 PM
David Webb
Hi,

I am having real trouble changing the width of a column on a datagrid. I
have tried changing the size of an existing column and adding a new column
with the width predefined but nothing seems to have any effect and its
driving me mad. Can somebody please tell me what I am doing wrong. I have
pasted some sample code below.

With DGUsers



..DataSource = DSUsers

..DataMember = "UserList"



Dim CCompany As New BoundColumn

CCompany.DataField = "Company"

CCompany.HeaderText = "Company"

CCompany.ItemStyle.Width = New Unit(3000, UnitType.Mm)

..Columns.Add(CCompany)



end with


Thanks in advance.

Dave

Author
21 Mar 2005 4:07 PM
Eliyahu Goldin
Try setting for the grid css rule table-layout:fixed.

Eliyahu

Show quoteHide quote
"David Webb" <david.w***@voiteq.com> wrote in message
news:%23rZ1V2iLFHA.3380@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> I am having real trouble changing the width of a column on a datagrid. I
> have tried changing the size of an existing column and adding a new column
> with the width predefined but nothing seems to have any effect and its
> driving me mad. Can somebody please tell me what I am doing wrong. I have
> pasted some sample code below.
>
> With DGUsers
>
>
>
> .DataSource = DSUsers
>
> .DataMember = "UserList"
>
>
>
> Dim CCompany As New BoundColumn
>
> CCompany.DataField = "Company"
>
> CCompany.HeaderText = "Company"
>
> CCompany.ItemStyle.Width = New Unit(3000, UnitType.Mm)
>
> .Columns.Add(CCompany)
>
>
>
> end with
>
>
> Thanks in advance.
>
> Dave
>
>