how to make GridView auto partial update like Gmail inbox


The way presented in this article is a way of how to add new rows from database to gridview without refresh of the page . This is useful when a client want to see new rows (eg. new letters) without having to refresh the page. If you wanna see a live demo, please logIn to your Gmail account(load standard Gmail), then send a letter from a different browser to your Gmail address and see that your Gmail Inbox will auto add the new letter’s row to your letters’ gridView

There are a quick way to show new rows : put GridView inside an updatePanel and refresh the updatePanel every 3(or any) seconds, but this way increase page source’s size and page’s load time…….


but , in this article we will learn a way to automatically get new rows automatically every 3(or any) seconds [by javascript timeout] from server[by jQuery get method] and then those new rows to gridView [by jQuery html manipulation]  


You should know :


jQuery html manipulation – you can learn from w3schools.com


jQuery and ajax – you can learn from w3schools.com


Suppose we wanna(want to) have a gridView with ability of auto adding new rows from database to it
we follow the following steps to have a gridView like Gmail Inbox perl gridView !


step 1 :
Add the following Javascript code to the page that contains your gridView


Leave a Reply

Your email address will not be published. Required fields are marked *