Radgrid range filtering headers language

2 posts, 0 answers
  1. Tal
    Tal avatar
    22 posts
    Member since:
    May 2013

    Posted 24 Aug 2013 Link to this post

    Hi,

    I am trying to translate the headers of "from" & "to" in my radgrid range filtering to hebrew. but what, i am having troubles doing so.

    screenshots is attached.

    Another thing, I am trying to translate all my grid controls ( what is the best way to link the resx file to the grid? I tried changing the culture property to he. Culture="he".

    Please help.

    Thank you
    Tal
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 26 Aug 2013 Link to this post

    Hi Tal,

    Please try the following code snippet to localize the "to" and "from" of RangeFiltering.

    C#:
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
        {
            GridFilteringItem fitem = (GridFilteringItem)e.Item;
            foreach (GridColumn col in RadGrid1.MasterTableView.RenderColumns)
            {
                if (col.ColumnType == "GridDateTimeColumn")
                {
                    LiteralControl LiteralFrom = (LiteralControl)fitem[col.UniqueName].Controls[0];
                    LiteralFrom.Text = "Your Text"; //From text
                    LiteralControl LiteralTo = (LiteralControl)fitem[col.UniqueName].Controls[3];
                    LiteralTo.Text = "Your Text"; //To text
                }
            }
        }
    }

    Thanks,
    Princy
Back to Top