This is a migrated thread and some comments may be shown as answers.

column size

6 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
appdev
Top achievements
Rank 1
appdev asked on 08 Jan 2009, 06:36 PM
how to adjust the column size to be the length of the data from the database. i can only set headerstyle.width= to certain width but not automatically to the length of the data. thanks.

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 09 Jan 2009, 07:23 AM
Hi Duy,

I guess the text is getting wrapped on the next line if it breaks the column width. If so try setting Wrap property to false and TableLayout to Auto. So that the column width will adjust according to the contents in it.

 <MasterTableView  Name="RadGrid1"  TableLayout="Auto"    ItemStyle-Wrap="false"     DataSourceID="SqlDataSource1" > 
 


Shinu
0
appdev
Top achievements
Rank 1
answered on 09 Jan 2009, 10:51 AM
can you provide the code from the server side? thanks Shinu
0
Princy
Top achievements
Rank 2
answered on 09 Jan 2009, 11:23 AM
Hello Duy,

The wrap and the TableLayout properties for the MasterTableView can be set from the code behind as shown below:
cs:
RadGrid1.MasterTableView.TableLayout = GridTableLayout.Auto; 
RadGrid1.MasterTableView.ItemStyle.Wrap = false

Thanks
Princy.
0
appdev
Top achievements
Rank 1
answered on 09 Jan 2009, 01:57 PM
i did what you told me too. it seems to work fine. but as soon as i expand a column i lose a few columns on the right. i tried to scroll to the right but it only allow me to scroll onlyl a little. do you know why? however if i remove the frozen column out of this. i am able to scroll to see all columns. so the frozen columns must have done something that disallowed me to scroll through and see all columns. if you have any idea please let me know. thanks
0
Shinu
Top achievements
Rank 2
answered on 12 Jan 2009, 10:08 AM
Hi Duy,

Which version of the RadControls are you using? Can you try with the Online demo and see whether the problem exists in the demo also.
Frozen columns

Shinu
0
appdev
Top achievements
Rank 1
answered on 14 Jan 2009, 04:20 PM
yes it does still exist. and i'm using the latest rad.
Tags
Grid
Asked by
appdev
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
appdev
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or