View Full Version : [CLOSED] Align only Column's content

Oct 02, 2013, 2:07 PM
Hi, i would like to know whether there is a "built-in" property to align only column's content as shown below:


It's possible to accomplish it by setting column's Align property, and then, "reset" Header align, as shown below:

<!DOCTYPE html>
<head id="Head1" runat="server">
<style type="text/css">
.fixHeaderAlign .x-column-header-inner {
text-align: left !important;
color: red;
<ext:ResourceManager runat="server" />
<ext:GridPanel runat="server" Title="Records" Frame="false" Width="500" Height="500">
<ext:Store AutoLoad="true" ID="_str" runat="server">
<ext:AjaxProxy Url="/Example/LoadFakeRecords/">
<ActionMethods Read="POST" />
<ext:JsonReader Root="data" />
<ext:Model runat="server">
<ext:ModelField Name="ID" Type="String" />
<ext:ModelField Name="Name" Type="String" />
<ext:ModelField Name="Address" Type="String" />
<ColumnModel runat="server">
<ext:Column Text="ID" DataIndex="ID" Cls="fixHeaderAlign" Align="Right" runat="server" />
<ext:Column Text="Name" DataIndex="Name" runat="server" />

namespace RCNBS.Visions.SandBox.Controllers
public class ExampleController : System.Web.Mvc.Controller
public ActionResult Index()
return View();

public StoreResult LoadFakeRecords()
List<Person> lst = new List<Person>();

for (int index = 0; index < 15; index++)
lst.Add(new Person
ID = index,
Name = "Name" + index

return new StoreResult(lst, lst.Count());

public class Person
public int ID { get; set; }

public string Name { get; set; }

Oct 02, 2013, 4:50 PM
Hi Raphael,

No, there is no such a property.

Your solution is good enough. Though, I would try to avoid an "!important" thing if possible.

Oct 02, 2013, 7:14 PM
Thank you Daniil. Please mark this thread as closed.