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

[Solved] Footer text (localization) from Database

1 Answer 20 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
geert fiedler
Top achievements
Rank 1
geert fiedler asked on 20 Sep 2011, 02:16 PM
Hi !

I need to overwrite the footer text of the mvc grid (Displaying items X to y). I saw the thread http://www.telerik.com/community/forums/aspnet-mvc/grid/444663-footer-text.aspx  where you recomend to modify the entry in the GridLocalization resource file. This is not suitable for me because i am getting the values from a database.

Is there a possibility to change the entries like for the  grid of the webforms?

Thanks a lot for your help!

1 Answer, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 21 Sep 2011, 10:40 AM
Hello Geert,

Here is how to do it by using grid's OnLoad event:
<script>
function onLoad() {
    var grid = $(this).data("tGrid");
    // for ajax binding
    grid.localization.displayingItems = "Showing items {0} - {1} from {2}";
 
 
    // for server binding only
    $(this).find(".t-status-text").text($.telerik.formatString("Showing items {0} - {1} from {2}", grid.firstItemInPage(), grid.lastItemInPage(), grid.total));
}
</script>

 

Regards,
Georgi Tunev
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
Tags
Grid
Asked by
geert fiedler
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
Share this question
or