dotnetspider.com
Login Login    Register      

TutorialsForumCareer DevelopmentResourcesReviewsJobsInterviewCommunitiesProjectsTraining

Subscribe to Subscribers
Talk to Webmaster
Tony John

Facebook
Google+
Twitter
LinkedIn
Online Membersnaveensanagasetti
baskar
Kavery
Padma
Danasegarane.A
More...
Join our online Google+ community for Bloggers, Content Writers and Webmasters




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: 2 out of 52 out of 5     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: 2 out of 52 out of 5     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: 2 out of 52 out of 5     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.



Next : “unknown error” (WebKitErrorDomain:103) Not supported browser in safari,chrome browser.
Previous : Reading contents of pdf file
Return to Discussion Forum
Post New Message
Category:

Related Messages



Follow us on Twitter: https://twitter.com/dotnetspider

Active Members
TodayLast 7 Daysmore...

Awards & Gifts
Email subscription
  • .NET Jobs
  • .NET Articles
  • .NET Forums
  • Articles Rss Feeds
    Forum Rss Feeds


    About Us    Contact Us    Copyright    Privacy Policy    Terms Of Use    Revenue Sharing sites   Advertise   Talk to Tony John
    Copyright © SpiderWorks Technologies Pvt Ltd., Kochi, India
    2005 - 2012 All Rights Reserved.
    .NET and other trademarks mentioned in this site belong to Microsoft and other respective trademark owners.
    Articles, tutorials and all other content offered here is for educational purpose only.
    We are not associated with Microsoft or its partners.