Wednesday, March 28, 2012

UpdatePanel

Hello group,

I followed the instructions of converting my application to work with Ajax control's and I have a few questions.

The current situation is that I have a webform with drop down list control and a gridview control. I wrapped my GridView control with the updatePanel Ajax control and it works fine, when selecting a value from the ddl the gridview control updates with the correct data.

Where should I put javascript code to run after the grid view updates (the code were in the window.load event before the Ajax) ??

I use VS2005 and when I switch to source view the Ajax controls tags are underlined with red, anybody knows why??

regards
Tongue Tied

If you are trying to show a loadder for the time when the data is fetched according to selection change of the ddl, you may use Update progress. Place a .gif image in it. And all is done. When you change the ddl selection the image will be shown as long the gridview doesn't get updated fully. Below is a sample code.

<

asp:UpdateProgressid="UpdateProgress1"runat="server">
<progresstemplate>
<divstyle="BACKGROUND-COLOR: #424242;border:solid;border-width:2px;border-color:#FFCC99"id="divAjax" ">
<IMGid="imageAjax"alt="Updating"src="../images/Ajax.gif"style="margin-right:15px;"/> Updating Please Wait...</DIV>
</progresstemplate>
</asp:UpdateProgress>

Thanx

But this it not the case.

Where should I put the javascript code to run whenever the gridview has finished updating the rows?? .

The window.onloadis working as expected only the first time the page is loaded.

regards

No comments:

Post a Comment