[CLOSED] Text Align right in fields and gridcolumn

  1. #1

    [CLOSED] Text Align right in fields and gridcolumn

    I want
    for these fields which contain numeric or decimal value,is there any property in InputField or in GridColumn ehere I can set text alignment?

    I use

     .x-grid-cell-inner {
    for grid panel ,and all field's text aligned right,but how can I do this for a specific column in grid panel.

    and I use
    but text not aligned to right.

    what to do?
    Last edited by Daniil; Oct 03, 2014 at 8:17 AM. Reason: [CLOSED]
  2. #2
    Hi @matrixwebtech,

    Do you have TextFields in a GridPanel? Do you use ComponentColumns or, maybe, you mean Editors?

    Please clarify.

    Providing us with a runnable test case is the best way to go.
  3. #3
    Hi Daniil bellow is some sample

    public class textalignController : Controller
            // GET: /textalign/
            public ActionResult Index()
                ViewBag.loadgrid = getSampleData();
                return View();
            private List<textalign> getSampleData()
                List<textalign> _textalign = new List<textalign>();
                _textalign.Add(new textalign
                    text = "Sample text",
                    value = 10.36,
                _textalign.Add(new textalign
                    text = "some more Sample text",
                    value = 25.38,
                return _textalign;
        public class textalign
            public string text { get; set; }
            public double value { get; set; }
    Q 1.How do set cell's text alignment for grid?i try with
    for grid column but cell's text alignment not changed,It will change header text alignment.

    Q 2.For TextField or NumberField how do I set text-alignment?
  4. #4
    Please set this for Columns:

    Please use for the TextFields and NumberFields:

    Or the Cls property:
  5. #5
    Thank you Daniil,you can close this.

Similar Threads

  1. [CLOSED] Group header align text bottom
    By rthiney in forum 2.x Premium Help
    Replies: 12
    Last Post: Dec 21, 2013, 10:39 PM
  2. [CLOSED] Icon Align in Text Field
    By amitpareek in forum 1.x Premium Help
    Replies: 3
    Last Post: Oct 13, 2011, 9:50 PM
  3. [CLOSED] Hi how to align the label text to center?
    By Etisbew in forum 1.x Premium Help
    Replies: 1
    Last Post: Oct 13, 2009, 12:03 PM
  4. [CLOSED] Text align left for button text
    By macap in forum 1.x Premium Help
    Replies: 4
    Last Post: Jul 09, 2009, 11:52 AM
  5. Replies: 1
    Last Post: Jun 18, 2009, 4:27 AM

Posting Permissions