I have a hierarchical Telerik RadGrid that sometimes contains child entries that are empty. For these, I want to overwrite the default text "No child records to display" with something user locale specific.
So I can do this:
<telerik:RadGrid ID ="SettingsGrid" ... />
<mastertableview ... />
<DetailTables>
<telerik:GridTableView ... />
<asp:Label ID="NoRecordLabel" runat="server" Text="whatever"/></div></NoRecordsTemplate>
Which causes the text "whatever" to appear when it should.
But I obviously want to do this dynamically, but I have failed in both of two ways:
1) By referencing my .resx file in the .ascx file. I import it's namespace and reference a certain resource as such:
Text="<%$ Resx:SiteTextResources.Globals_Close %>"
(This works in other files in the same solution)
But this only produces empty text.
2) I haven't been successful at retrieving the Label programatically from the code behind. I looked at this: http://www.telerik.com/community/forums/aspnet-ajax/grid/how-to-access-controls-in-norecordstemplate.aspx but didn't get that approach to work, as I just can't seem to find the Label. I get an OutOfBoundsException, which I guess means the GetItems() method returns null.
Any ideas? Would appreciate it a lot!