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 have a question about changing the grid's paging size dynamically. Our users want to be able to customize the page size of the grid via a dropdownlist. I'd like to do a SendCustomRequest() and handle the request in InitializePostBack. Two things that I'm not sure how to do, however, are: (i) passing arguments via the customrequest and (ii), refreshing the grid so that the change takes effect and the rows are updated. In this case, I'd like to pass the value of the user's selection which comes from a dropdownlist. When I make the change to the PagingSize in the InitializePostBack event, it isn't reflected in the grid. The pagesize remains. What is the recommended solution?
Thanks
Brad
I made a simple sample of WebGrid based on your scenario. In my test page, I put an ASP.Net DropDownList and a WebGrid. The DropDownList items are declared in design-time and the grid is set to have ‘ClassicPaging’ enabled.
OnChange event of DropDownList, a function that is used to ‘Refresh()’ WebGrid is added. The ‘Refresh’ action will cause WebGrid do FlyPostBack. During FlyPostBack, PrepareDataBinding server side event of WebGrid is invoked. Within this event, the value of ‘PagingSize’ property is set where the value is obtained from the selected item of the DropDownList.
The simple sample is enclosed as attachment. please have the sample tested on your end and let us know whether it helps or not.
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