This question is locked. New answers and comments are not allowed.
On my page i use grid, which load data with ajax. But after page loading, for a few moments displayed message "no records" from
globalization
file. I try use this code
but message dissapers only after second. Is there an easy way to remove message? thanks
$(document).ready(function () { $("tr.t-no-data").find("td").text(""); });5 Answers, 1 is accepted
0
Hello Francisko,
If you want to hide the "no records" message unconditionally, it will be a lot easier and hassle-free to do it with CSS, and you will not experience any lags. Alternatively, use
Html.Telerik().Grid()
.NoRecordsTemplate(" ")
Greetings,
Dimo
the Telerik team
If you want to hide the "no records" message unconditionally, it will be a lot easier and hassle-free to do it with CSS, and you will not experience any lags. Alternatively, use
Html.Telerik().Grid()
.NoRecordsTemplate(" ")
Greetings,
Dimo
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Francisko
Top achievements
Rank 1
answered on 08 Nov 2011, 05:45 PM
the problem is that if ajax request returned with no data, i want display message about no records
0
Accepted
Hello Francisko,
In this case you can use an empty NoRecordsTemplate or one that says "loading..." or something like that. Subscribe to the OnDataBound event of the Grid, check how many rows you have in the handler ( $(this).data("tGrid").data.length ) and change the NoRecords message to something else.
Regards,
Dimo
the Telerik team
In this case you can use an empty NoRecordsTemplate or one that says "loading..." or something like that. Subscribe to the OnDataBound event of the Grid, check how many rows you have in the handler ( $(this).data("tGrid").data.length ) and change the NoRecords message to something else.
Regards,
Dimo
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Francisko
Top achievements
Rank 1
answered on 09 Nov 2011, 01:00 PM
thanks for reply, this is good solution for me.
One more question: can i get strings from gridlocalization.resx file in code?
One more question: can i get strings from gridlocalization.resx file in code?
0
Accepted
Hi Francisko,
Yes, you can instantiate a
Telerik.Web.Mvc.UI.GridLocalization(ILocalizationService, CultureInfo)
object in the Controller and use its string properties.
ILocalizationService is an interface defined in Telerik.Web.Mvc / Infrastructure / ILocalizationService.cs
Regards,
Dimo
the Telerik team
Yes, you can instantiate a
Telerik.Web.Mvc.UI.GridLocalization(ILocalizationService, CultureInfo)
object in the Controller and use its string properties.
ILocalizationService is an interface defined in Telerik.Web.Mvc / Infrastructure / ILocalizationService.cs
Regards,
Dimo
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 Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
