PDA

View Full Version : Align Grid row text at center



rati592
1 Jul 2009, 11:40 PM
Hello how can we make the grid text bold and align them at center.

Animal
1 Jul 2009, 11:53 PM
Using CSS.

rati592
2 Jul 2009, 12:37 AM
Hello how to apply Css to grid rows.

Animal
2 Jul 2009, 12:38 AM
On all Grids, just one Grid, just one row, selected rows, all columns???

We have no idea what you really want.

rati592
2 Jul 2009, 1:16 AM
On all rows and columns.

Animal
2 Jul 2009, 1:25 AM
Well LOOKING at a grid with Firebug it is very easy to determine a CSS rule.



#myGridId div.x-grid3-cell-inner {
text-align: center;
}


You need to learn to do things like this for yourself to be a successful developer!

slemmon
23 Jul 2009, 7:05 AM
Nothing like getting beat down and helped up by the same dude, huh? :)

blackghost
29 Aug 2009, 12:00 PM
hi Animal,

If I want to align difference header and data of one or two columns, how can I do that ?
For sample , header of column1 { align - text: center} , data of column1 { align-text: left}
I tried to set as : { header : 'X', dataIndex: 'X', align: 'center', css: 'text-align:left;'} , but it seems 'align' property is overrided property 'css' at 'text-align', so this columns always is aligned 'center'.

Any ideas, I am very appreciated.

blackghost
30 Aug 2009, 1:30 AM
No one know ?

Bakul
23 Sep 2009, 11:30 AM
Hi,

Setting up Column's name in HTML works for me.
Like:

column = new ColumnConfig("col1", <b>Bold Column*</b>, 80);

Give a try.

Thanks,
Bakul.

yeeen
29 Dec 2011, 7:14 PM
In Firebug, u can see an "element.style{ text-align: left; }" that is overriding the css, I am unable to change the text-align...