|
Forums » .NET » ASP.NET »
|
Increase page size automatically for messages in gridview |
Posted Date: 19 May 2012 Posted By:: amit sharma Member Level: Bronze Member Rank: 3394 Points: 1
Responses:
3
|
how to increase page size automatically for messages in gridview using ajax toolkit??
|
Responses
|
#671482 Author: Asheej T K Member Level: Diamond Member Rank: 2 Date: 19/May/2012 Rating:  Points: 3 | Hi,
It depends on what criteria you wanted to change the PageSize. You didn't mention the criteria so below is sample code which you can use to change the GridView PageSize based on dropDown Selection.
protected void ddlChangePageSize_SelectedIndexChange(object sender, EventArgs e) { GridView1.PageSize = Convert.ToInt32(ddlChangePageSize.SelectedValue); }
If you wnated to Ajax, then put the dropdownList inside UpdatePanel so that whole page will not postback
Regards, Asheej T K Microsoft MVP[ASP.NET/IIS] DotNetSpider MVM
Dotnet Galaxy
| #671486 Author: amit sharma Member Level: Bronze Member Rank: 3394 Date: 19/May/2012 Rating:  Points: 1 | i mean to say,, as messages will increase,page should automatically...as it is on FB.
| #671488 Author: Ajatshatru Upadhyay Member Level: Gold Member Rank: 19 Date: 19/May/2012 Rating:  Points: 3 | Hi,
Seems you want to add scroll to your page. if this is your requirement, you can add some css code to your gridView. See the below code:
.myPage { width: 860px; height :600px; overflow: scroll; }
The above code add a vertical scroll bar to the page, if page height exceeds the defined height limit. You just need to fix the height.
Hope it'll help you. Regards Ajatshatru
|
|
| Post Reply |
|
|
|
 | | This thread is locked for new responses. Please post your comments and questions as a separate thread. If required, refer to the URL of this page in your new post. |
|
|
|
|
 Follow us on Twitter: https://twitter.com/dotnetspider
|
|