iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I am working on Webgrid and it has 1000 rows.
I set the paging size = 100
I want to know, can I set the default paging page to 3, which is display rows from 301-400 in stead of display rows from 1-100 every time?
Thanks!
David
There is no native way to set the page to a specific page number on the server-side code, but you might want to try this workaround.
First, add an ASP.NET HiddenField control, let’s say HiddenField1, into the page. Set the value of HiddenField1 in the Page_Load server-side event as shown in the following snippet code.
protected void Page_Load(object sender, EventArgs e) { HiddenField1.Value = "3"; }
Modify the “GotoPage3” JavaScript function into the following.
window.onload = function () { var WebGrid1 = ISGetObject("WebGrid1"); var page = document.getElementById("HiddenField1").value; WebGrid1.GotoPage(page); return true; }
The modified JavaScript function will be executed on window on load. It will get the value of the HiddenField1 control and navigate WebGrid to the specified page.
Hope this helps.
Please try to add following JavaScript function (in OnAfterInitialize client-side event of WebGrid or on window on load) in order to set the default page to page 3.
function GotoPage3() { var WebGrid1 = ISGetObject("WebGrid1"); WebGrid1.GotoPage(3); return true; }
The GotoPage3 function utilizes GotoPage(n) method, where n is integer as the number of targeted page. The method switches to specific page of the data in WebGrid.
But can we do this on the server side code?
Should you need further assistance or run into any technical problems regarding our controls, feel free to post it into our forum. We would be happy to assist you again.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname