Center text in columns

  1. #1

    Center text in columns

    As shown in the picture when I add a ImageCommand, all the column is aligned to the left.
    Does anyone have any idea how to keep it in the center?

    For example Align = left does not work on the Price column in the following example.

    https://examples2.ext.net/#/GridPane...pare_Commands/


    Click image for larger version. 

Name:	Cattura.jpg 
Views:	16 
Size:	101.6 KB 
ID:	16751
    Last edited by ADV; Nov 29, 2014 at 8:49 PM.
  2. #2
    You can find a solution to a similar problem in this thread: http://forums.ext.net/showthread.php...ll=1#post79005

    There is an alternative approach. In this example https://examples2.ext.net/#/GridPane...pare_Commands/
    You must add attribute id to column like this:
    <ext:Column ID="PriceCol" runat="server" Text="Price" DataIndex="price">
    And then stylesheet will look like this:
    .x-grid-cell-PriceCol {text-align: center !important;}
    .x-grid-cell-PriceCol > div {float: none !important; display: inline-block !important;}

Similar Threads

  1. Replies: 6
    Last Post: Jul 11, 2012, 9:00 AM
  2. Replies: 0
    Last Post: Sep 04, 2011, 9:29 AM
  3. Replies: 1
    Last Post: May 18, 2010, 11:53 PM
  4. [CLOSED] Hi how to align the label text to center?
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 13, 2009, 12:03 PM
  5. [CLOSED] Center Tab Text in Tabpanel
    By HOWARDJ in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 20, 2009, 3:09 AM

Posting Permissions