# Right To Left Rendering

Develop powerful and lightweight web applications using ASP.NET MVC controls. Learn more about the ComponentOne MVC controls in ASP.NET MVC documentation.

## Content



FlexGrid has the in-built functionality of rendering the content from the right to the left of the page required in languages such as Arabic and Hebrew. While HTML supports this feature with the 'dir' attribute, FlexGrid performs this automatically on setting 'dir' to 'rtl' on any element without setting any properties on the control. The same can also be achieved by using the 'direction' attribute of CSS.


> type=note
> The '**dir**' attribute value is inherited, so if you set this attribute on the body tag, the entire page including the grid will be rendered from right to left.

![](https://cdn.mescius.io/document-site-files/images/2b3ac322-100e-4637-958d-fb40dcda3f44/images/flexgridrtl.png)

The following code examples demonstrate how to set the 'dir' attribute to show right to left rendering in the FlexGrid:

#### In Code

**RightToLeftController.cs**

```csharp
public ActionResult RightToLeft()
{
    return View(Sales.GetData(10));
}
```

**RightToLeft.cshtml**

```razor
@using MVCFlexGrid.Models
@(Html.C1().FlexGrid<Sale>()
    .AutoGenerateColumns(false)
    .Bind(bl => bl.Bind(Model))
    .Width(620)
    .CssClass("grid")
    .Columns(bl =>
    {
        bl.Add(cb => cb.Binding("ID"));
        bl.Add(cb => cb.Binding("Start"));
        bl.Add(cb => cb.Binding("End"));
        bl.Add(cb => cb.Binding("Country"));
        bl.Add(cb => cb.Binding("Product"));
    })
    .HtmlAttribute("dir", "rtl")
)
```

## See Also

[Quick Start](/componentone/docs/mvc/online-mvc/workwithcontrols/FlexGrid/FlexGridQuickStart)

**Reference**

[FlexGrid\<T> Class](/componentone/api/mvc/online-mvc/dotnet-framework-api/C1.Web.Mvc/C1.Web.Mvc.FlexGrid-1.html)