Showing posts with label updatepanels. Show all posts
Showing posts with label updatepanels. Show all posts

Wednesday, March 28, 2012

change the mode of a DETAILSVIEW to INSERT mode as soon as a NEW RECORD is inserted in the

Hi, In ASP.NET 2.0 with AJAX, i have a fairly long-size form. I have lots of DETAILSVIEW on screem inside UPDATEPANELS from AJAX. The postbacks occur corrrectly without updating the entire page.

Now, i want to automatically change the mode of a DETAILSVIEW to INSERT mode as soon as a NEW RECORD is inserted in the DETAILSVIEW.

How can i accomplish this ?

Alex

assuming that detailsview will return to readonly mode, you can set following in load_complete (not load)

If DetailsView1.CurrentMode = DetailsViewMode.ReadOnly Then DetailsView1.ChangeMode(DetailsViewMode.Insert)End If

hope this helps.

Jae.

Monday, March 26, 2012

Centering a progress indicator over an UpdatePanel

I have a number of GridViews in my application that are wrapped in UpdatePanels. I would like to display a progress indicator directly in the center of the GridView while the panel is refreshing. I started out using the UpdateProgress control, but I couldn't find a decent way to center it over the GridView. I ended up using the UpdatePanelAnimationExtender and using the ScriptAction to do the work. It seems to work OK, but I am thinking there must be a better way of doing this - this seems like it would be a pretty common requirement. Anyway here is a link to the description of the apporach I am currently usinghttp://mattberseth.com/blog/2007/05/ajaxnet_example_using_an_updat.html. Any feedback would be appreciated.

Matt Berseth

http://mattberseth.com

This isn't a polished solution, but this should provide some insight for you:http://codeclimber.net.nz/archive/2007/05/17/How-to-make-a-Gmail-like-loading-indicator-with-ASP.NET-Ajax.aspx

Catputing events in UpdatePanels

All,

Hopefully someone here will have an answer for something that's driving me crazy at the moment...

I have a control on a page that is within an update panel. The control has to be within the update panel as we need to change the control without a full page refresh.

All works well except a series of post backs that are generated that should perform some processing then redirect the user to a new page. As is logical this doesn't work as it's not the browser that is generating the postbacks but soem JavaScript in the page.

What I need to know is: Is it possible to tell the update panel to ognore events created by these controls? Or am I going to have find a different way around this problem?

TIA

Stu

Opps... Do I feel dum... Turns out it works just fine, I just assumed that the person who prototyped the page had wired up all the event handers, in fact he'd only wired up half. The reason the click did nothing was because there was no handler there to do anything...Embarrassed