Reload grid page

QuestionsReload grid page
Scott asked 11 years ago

Hi, can i reload grid page by toolbar button without returning to page 1?

2 Answers
Abu Ghufran answered 11 years ago

You can have a custom toolbar button with 'current:true'

<script type="text/javascript">
/*
CUSTOM TOOLBAR BUTTON
———————
caption: (string) the caption of the button, can be a empty string.
buttonicon: (string) is the ui icon name from UI theme icon set. If this option is set to “none” only the text appear.
onClickButton: (function) action to be performed when a button is clicked. Default null.
position: (“first” or “last”) the position where the button will be added (i.e., before or after the standard buttons).
title: (string) a tooltip for the button.
cursor : string (default pointer) determines the cursor when we mouseover the element
id : string (optional) – if set defines the id of the button (actually the id of TD element) for future manipulation
*/
jQuery(document).ready(function(){

jQuery('#list1').jqGrid('navButtonAdd', '#list1_pager',
{
'caption' : 'Reload',
'buttonicon' : 'ui-icon-refresh',
'onClickButton': function()
{
$("#list1").trigger("reloadGrid", [{current:true}]);
},
'position': 'last'
});
});

</script>

Evgeniy Yakovchuk answered 11 years ago

Thank you very much!

Your Answer

16 + 18 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?