This is a migrated thread and some comments may be shown as answers.

Locatizacion Radgrid Columns and labels in EditFormSetting

0 Answers 29 Views
Grid
This is a migrated thread and some comments may be shown as answers.
July
Top achievements
Rank 2
July asked on 29 Sep 2011, 06:04 PM
I need apply localization for Columns in radGrid and for all labels in EditFormSetting.
How i can do this?


EditFormSettings

   <EditFormSettings InsertCaption="Add new User" CaptionFormatString="Edit User: <b>{0}</b>"
                CaptionDataField="FirstName" EditFormType="Template" PopUpSettings-Modal="true"
                PopUpSettings-Height="400px" PopUpSettings-Width="85%" >
                <FormTemplate>
                    <asp:Table runat="server" CssClass ="EditFormTable" >
                       
                        <asp:TableRow>
                            <asp:TableCell  CssClass="CellLabelL"><asp:label runat="server" ID="lblFirstName" /></asp:TableCell>
                     
Thanksç



I FOUND THS SOLUTION... SORRY...


the solution is:


For Fields in EditFormSetting

 protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
      {
        if (_recources == null || _culture == null)
          _culture = System.Web.HttpContext.Current.Session["culture"] == null ? "en-US" : System.Web.HttpContext.Current.Session["culture"].ToString();
        _recources = new ResourceManager("WebSearch.UI.Admin.Resources.UserManagement", Assembly.GetExecutingAssembly());


        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
        {
          ((Label)e.Item.FindControl("lblFirstName")).Text = _recources.GetString("lblFirstName", new CultureInfo(_culture));
        }
}

For Columns
   this.RadGrid1.MasterTableView.GetColumnSafe("FirstName").HeaderText = _recources.GetString("lblFirstName", new CultureInfo(_culture));
      

No answers yet. Maybe you can help?

Tags
Grid
Asked by
July
Top achievements
Rank 2
Share this question
or