|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Datagrid column widthI 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 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 > >
UserControl inside of datagrid - loses its viewstate when datagrid is re-bound on postback
iterate through only one column of a datagrid Annoyingly simple problem _EditCommand not firing... Access individual item in a datagrid Datagrid sorting does not work Group Headers in Datagrid Can't get text value of hidden (visible = false) column.. Check Parent-child relationship in datagrid Container |
|||||||||||||||||||||||