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

Width of content in Grid

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Olo
Top achievements
Rank 1
Olo asked on 12 Jan 2009, 12:35 PM
Hi,
I'm trying to set grid's appearance in FF and IE 6/7. I have 5 columns to display in grid. I want that these columns will take all width of grid.
I put the code:
grid.HorizontalAlign = HorizontalAlign.Justify; 

but it's not working. I have empty place in grid between columns and border. I showed this situation below:
_________________
|  free columns free  |
|         columns          |
|_________________|

How can I mend it?

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 12 Jan 2009, 01:07 PM
Hello Olo,

The HorizontalAlign is generally intended for plain text or inline elements and is not supposed to work for tables and other block-level elements.

I suppose you are using scrolling with static headers. In this case you can do the following:

1) set TableLayout="Fixed" for the MasterTableView. This will make the MasterTableView expand to 100% width automatically and all columns will have equal widths (if you don't set any column widths)

or

2) set some suitable Width for the MasterTableView

or

3) set suitable widths for the columns, so that the sum of all column widths matches the width of RadGrid


Regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Princy
Top achievements
Rank 2
answered on 12 Jan 2009, 01:11 PM

Tags
Grid
Asked by
Olo
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Princy
Top achievements
Rank 2
Share this question
or