Showing posts with label display. Show all posts
Showing posts with label display. Show all posts

Wednesday, March 28, 2012

Multiple Update Panels Problem

hello!

I have 4 update panels on my page, 2 of which I used to load slow loading data displayed in gridviews. I wanted to display the layout of the page before it loads the data (showing a small loading graphic in the updated divs) so the user does not think the page is stuck. To do this, I used two timer controls with interval 1 so that once the page is loaded, the timers will tick and the data will be fetched and bound to the gridviews. I am facing a few problems:

1. One gridview's data is slower than the other, and instead of the faster one displaying first then the slower one, it waits until the slower one fetches its data and then they are both displayed at the same time.

2. I have another gridview that uses a timer (interval 6000) and the timer_tick sub for it scrolls through the gridview pages. But the timer does not start ticking until the other two gridviews load.

3. The 4th update panel has a next and previous button displaying news articles. The buttons do not cause anything until the two slow panels load (just like the gridview in point 2 above).


Is there another way I can trigger the two slow gridviews to load AFTER the page loads and displays something for the user? And why do the other update panels wait for these two slow panels to finish before letting the user update them?

Your speedy support is greatly appreciated!

Make sure that you set UpdateMode="Conditional" on all the update panels to be able to update them individually. Otherwise they will all update their contents on postback.

Call UpdatePanel.Update() on the ones that should be updated.


Try delay loading your update panel like the following:
http://mattberseth.com/blog/2007/07/delay_load_an_updatepanel.html


Wow thanks for the replies! I'll try this stuff out and let you know!


OK I tried Matt Berseth's delay load approach. For some reason, the __doPostBack method does not force the button click method to be invoked. As a result, the two gridviews do not load.

<script type="text/javascript" language=javascript>
var _isInitialLoad = true;

function pageLoad(sender, args){
if(_isInitialLoad){
_isInitialLoad = false;
// simulate a button click by forcing the postback
// causing the updatepanel to update
__doPostBack("<%= me.btnHidden.ClientID %>","");
}
}
</script>

<asp:button id="btnHidden" runat="server" style="display:none;" OnClick="btnHidden_Click" />

<asp:UpdatePanel id="UpdatePanel4" runat="server" UpdateMode="Conditional">
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnHidden" Eventname="Click"></asp:AsyncPostBackTrigger>
</Triggers>

// the content of this panel is a gridview.. the btnHidden_Click sub binds the data to the gridview..

Any ideas?


Just an update.. I changed the dopostback call from

__doPostBack("<%= me.btnHidden.ClientID %>","")

to

__doPostBack("<%= me.btnHidden.UniqueID %>","")

that worked but the updateprogress control did not appear (the screen looked like it finished loading and then suddenly the gridviews got displayed).

I really appreciate your assistance!


Hi,

I've created a user control that I'm trying to use to delay content loading on a page for long running controls.check out this:Delaying Content Load using Timer and UpdatePanel

Best Regards


Hey man thanks for the update but the link refers to this site: http://www.null.com/t/1127147.aspx

which displays nothing! ;-) can you plz update with the proper link so i can test?

thx for ur help!


Thanks for the control Jin-Yu,

Here's the url
http://forums.asp.net/t/1127147.aspx

Monday, March 26, 2012

Mutiable Roll of Tabs

I want two rolls of tabs. I make the tabcontainer Width 650px and the tabs show up in the display as two rolls of tabs but when I run it I get a tabcontainer that is 650px with one roll of tab go on the right and do not give me the two roll. Is it possible to get two rolls of tab for the same container?

Hi,

Tabcontainer extender support multi row header now. You may need to make change to the source code of the tabContainer by yourself.

My Calendar Extender does not display in my Formview

I have two calendar extenders corresponding to a texbox each. They are all inside a Formview. When the textboxes are clicked nothing displays.

I have tried the calendar extender outside the Formview and everything seems to work fine.

I have tried the script manager in and outside the formview to no avail. Is the script manager supposed to be inside the Formview as well ? Any particular place where those controls are supposed to be to function properly??

When I first started to apply the extenders I inserted the script manager control after the extender, I wonder if that may have screwed up things. Althought, I have redone it to no avail. Anyideas ?

I've tried this code and works fine:
 <asp:ScriptManager ID="ScriptManager1" runat="server" /> <asp:FormView ID="FormView1" runat="server" DefaultMode="Insert"> <InsertItemTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TextBox1"> </ajaxToolkit:CalendarExtender> </InsertItemTemplate> </asp:FormView>

You should post your code here to resolve your problem.

Wednesday, March 21, 2012

Need help with TabContainer in DotNetNuke

When I add an AjaxControlToolkit TabContainer to a module, it does not display properly in IE6 or IE7, but it does in Firefox. You can view the problem here:

http://www.websmithing.com/portal/Tabs/tabid/64/Default.aspx

Here is the code:

<%@dotnet.itags.org. Control Language="C#" AutoEventWireup="true" CodeFile="Tabs.ascx.cs" Inherits="DesktopModules_TabTest_Tabs" %>
<%@dotnet.itags.org. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<cc1:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="1"
Height="200px" Width="200px">
<cc1:TabPanel runat="server" HeaderText="TabPanel1" ID="TabPanel1">
</cc1:TabPanel>
<cc1:TabPanel ID="TabPanel2" runat="server" HeaderText="TabPanel2">
</cc1:TabPanel>
</cc1:TabContainer>

using System;
using DotNetNuke;
using DotNetNuke.Entities.Modules;

public partialclass DesktopModules_TabTest_Tabs : PortalModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (DotNetNuke.Framework.AJAX.IsInstalled())
{
DotNetNuke.Framework.AJAX.RegisterScriptManager();
}
}
}

I built a very simple user control and put it onto an aspx page and had no problems with viewing it in IE. You can see it here:

http://www.websmithing.com/portal/TabPanel.aspx

So it somehow seems to be a problem related to DotNetNuke...

thanks

Nick

ps. I have posted the question in the DotNetNuke Forums

I want to thank David Anson of Microsoft for finding the solution to this problem. Here was our thread:

Thank you David, that was exactly the problem. The TabContainer isdisplaying properly now. My menus are a little bit off in DotNetNuke,but I'm going to work on fixing the skin rather than going back to theother doctype.

For those who want to know, here is where the fix needs tohappen. In Default.aspx.vb at about line 259, I changed theDocTypeValue from:

'Dim DocTypeValue As String = "<!DOCTYPE HTML PUBLIC ""-//W3C//DTD HTML 4.0 Transitional//EN"">"

to:

Dim DocTypeValueAs String ="<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" "" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"">"

once again, thank you!
Nick

- Hide quoted text -

On Dec 4, 2007 10:11 PM, David Anson wrote:

The DOCTYPEs are subtly different and I'm wondering if theproblematic one is leaving the browser in quirks mode (according to myunderstanding of the last paragraph ofhttp://msdn2.microsoft.com/en-us/library/ms535242.aspx).If so, that could be the problem as we don't support quirks mode with theToolkit. Maybe try switching to the same DOCTYPE for both to see if that helps?


I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.

I'm having this problem with DNN 5.5.1 but this fix doesn't apply b/c when I view source on my browser, it already has the appropriate doctype declaration.  The .vb code is diferent in this version anyway.