Grid RTL Support
The grid will detect if the html direction is rtl and construct itself accordingly
Grid RTL
Tree grid RTL
Grid with frozen columns RTL
GridDemo/RTLSupport.cshtml
<div style="direction: rtl;">
<h2>Grid RTL</h2>
@(Html.Awe().Grid("RtlGrid")
.Url(Url.Action("GetItems", "LunchGrid"))
.Height(300)
.Mod(o => o.Main())
.Resizable()
.Reorderable()
.Columns(
new Column { Bind = "Id", Width = 100 },
new Column { Bind = "Person" },
new Column { Bind = "Price", Width = 100 },
new Column { Bind = "Location" }))
<br />
<br />
<h2>Tree grid RTL</h2>
@(Html.Awe().Grid("RtlTreeGrid")
.Url(Url.Action("SimpleTree", "TreeGrid"))
.Columns(
new Column { Bind = "Name" },
new Column { Bind = "Id", Width = 100 })
.Groupable(false)
.PageSize(3)
.Height(300))
<br/>
<br/>
<h2>Grid with frozen columns RTL</h2>
@(Html.Awe().Grid("RtlGridFz")
.Url(Url.Action("GetItems", "LunchGrid"))
.Height(300)
.Mod(o => o.Main().Freeze(2, 1))
.ColumnWidth(200)
.Resizable()
.Reorderable()
.Columns(
new Column { Bind = "Id", Width = 100 },
new Column { Bind = "Person" },
new Column { ClientFormat = "sample", Header = "sample 1"},
new Column { ClientFormat = "sample", Header = "sample 2"},
new Column { ClientFormat = "sample", Header = "sample 3"},
new Column { ClientFormat = "sample", Header = "sample 4"},
new Column { ClientFormat = "sample", Header = "sample 5"},
new Column { ClientFormat = "sample", Header = "sample 6"},
new Column { ClientFormat = "sample", Header = "sample 7"},
new Column { Bind = "Price", Width = 100 },
new Column { Bind = "Location" }))
</div>
Comments