Completed
Last Updated: 20 Jan 2020 13:12 by ADMIN
Imported User
Created on: 01 Apr 2012 20:37
Category: Data Source
Type: Feature Request
28
Column alignment property for grid/list columns
Right aligned columns are common for number fields and it would be nice to simply set a property in HTML and/or the view-model:
E.g { "field": "amount", "align": "right", "title": "Amount", "width": "110" }
2 comments
ADMIN
Alex Hajigeorgieva
Posted on: 20 Jan 2020 13:12

Hello,

The columns feature an attributes property that can be used to right align their text:

 columns: [ {
    field: "name",
    attributes: {
      "class": "table-cell",
      style: "text-align: right; font-size: 14px"
    }
  }],

If you would like to right align the entire grid, you can include the rtl CSS and wrap the grid in a container with class "k-rtl":

https://dojo.telerik.com/@bubblemaster/EZAgahEl

<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.1.114/styles/kendo.common.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.1.114/styles/kendo.rtl.min.css">
<link rel="stylesheet" href="https://kendo.cdn.telerik.com/2020.1.114/styles/kendo.silver.min.css">
</head>
<body>
  <div class="k-rtl">
    <div id="grid"></div>
    </div>

See also: https://docs.telerik.com/kendo-ui/accessibility/supporting-rtl-languages

Kind Regards,
Alex Hajigeorgieva
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
ADMIN
Telerik Admin
Posted on: 03 Apr 2012 13:23
This can be a useful enhancement for the grid widget columns, we may conveive it for a future version.