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

RadGrid localization problem

5 Answers 208 Views
Grid
This is a migrated thread and some comments may be shown as answers.
SCT
Top achievements
Rank 1
SCT asked on 12 Oct 2012, 11:28 AM

Hi Telerik,

 

We have problem with RadGrid localization. Our web page (which contains the RadGrid) is localized by local resources using the functionality „Generate Local Resource“. Applying such function adds the meta information into the RadGrid. Thus, here is the problem. The RadGrid doesn’t work correctly with those meta information. So, when the AJAX is used the RadGrid doesn’t load the data, or more exactly in other words:  the “NeedDataSource” event is not fired and therefore the RadGridData_NeedDataSource handler is not called.

 

Here is the code snippet of our implementation:

 

 

        protected void Page_Load(object sender, EventArgs e)

        {

             RadAjaxManager.GetCurrent(this.Page).AjaxSettings.AddAjaxSetting(RadGridData, RadGridData, RadAjaxLoadingPanel);

 

            if (IsPostBack == false)

                   RadGridData.Rebind();

         }

 

        protected void RadGridData_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)

        {

            DataTable  dataTable = GetObjectData();

            RadGridData.DataSource = dataTable;

        }

If the meta information are deleted, the RadGrid works normally again. The other telerik controls are localized as well, and they’re working normally. If we keep at least one meta information at some place, the problem appears again. 

We found an example of using Global resources for telerik controls localization on your websites. We’ve tried it, however it didn’t make desired effect. We’ve copied the file RadGrid.Main. sk-SK.resx into the App_GlobalResources folder. Although the entire page is localized, the RadGrid is not. In addition, these settings is not working although the property (Culture = "sk-SK") is set directly.

 

Is there any way to perform mentioned localization using the  ‘local resources‘ approach?

Thank you very much for your advice.

 

Kind regards,

SCT

5 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 17 Oct 2012, 01:18 PM
Hi,

Can you isolate the problem in a sample runnable project and send it to us via support ticket? We will examine it locally and will get back to you with additional information.

Kind regards,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sharon Forman
Top achievements
Rank 1
answered on 09 Apr 2013, 07:33 PM

I am seeing the same issue with version Q1 2012 SP1.  Was it ever resolved?

Thanks!
0
Pavlina
Telerik team
answered on 10 Apr 2013, 11:22 AM
Hello,

Did you mean version Q1 2013 SP1, because this is the latest version of the controls?

All the best,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Sharon Forman
Top achievements
Rank 1
answered on 10 Apr 2013, 03:31 PM
No, I am on a version from last year.  Is this something that has been fixed in the last year?  I can't easily upgrade to the latest version.

Also, I have put RadGrid.Main.resx in the App_GlobalResources but all of the grid resources still get put into the aspx.resx file when I Generate Local Resources through Visual Studio.  Is there a way for the global resources to be used for the grid when local resources are used for the aspx page?

Thanks,
Sharon Forman
0
Pavlina
Telerik team
answered on 15 Apr 2013, 02:34 PM
Hi Sharon,

Telerik controls Global Resources are ignored by the local resources. Basically, local resource file content is for single file or page where as Global resource file is for total application.
Therefore the described behaviour is expected because when you want to localize the controls on one page your Local Resources are applied.

You can try to maintain resource file for total application that means globally and see if this works for you. In that case accessing resource file content is slightly different.

You have to mention resource file name for resources keyword as shown in the article below:
Globalization and Localization (refer to Global Resource section)

Additionally, for more information about Localization and Globalization in .NET you can refer to the link below:
http://dhavalupadhyaya.wordpress.com/tag/aspnet-creating-global-resource-file/
 
Greetings,
Pavlina
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
SCT
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Sharon Forman
Top achievements
Rank 1
Share this question
or