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

Per-Grid Localization

3 Answers 43 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Phillip
Top achievements
Rank 1
Phillip asked on 10 Jan 2020, 04:52 PM

Hi,

In my program I have two virtual grids in the same form, viewable and usable simultaneously. By selecting elements in one grid you change what data is loaded into the other. For the sake of supplying more context-sensitive help, I had intended to replace the RadVirtualGridStringId.NoDataText string in the second grid with a more specific prompt depending on why no data is found. This works, but in the event that the first grid was unable to be populated with data, it needs to have different text to the second.

The Localization page explains how to change the LocalizationProvider for all virtual grids, but is there a way to set the provider of a specific instance of the grid?

Thanks

3 Answers, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 13 Jan 2020, 02:37 PM

Hello Phillip,

The localization provider is static and it is shared by all RadVirtualGrid instances inside the application. The NoDataText string basically sets the Text property of the table element. As you need to have different text displayed on each of the grids, you can set it this way: 

this.radVirtualGrid1.VirtualGridElement.TableElement.Text = "Grid 1 no data!";
this.radVirtualGrid2.VirtualGridElement.TableElement.Text = "Grid 2 no data!";

I hope this helps. Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Phillip
Top achievements
Rank 1
answered on 13 Jan 2020, 03:48 PM

Hi Hristo,

Thanks for the info about it just setting the Text property, I added an event listener to ViewInfoPropertyChanged which should consistently fire after the internal event that sets it from the localization, so even though technically the localization DOES happen, my event immediately overrules its setting.

0
Hristo
Telerik team
answered on 14 Jan 2020, 07:05 AM

Hello Phillip,

I hope that setting the Text property of the TableElement would fit your local setup. 

Let me know if you need further assistance.

Regards,
Hristo
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
VirtualGrid
Asked by
Phillip
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Phillip
Top achievements
Rank 1
Share this question
or