Showing posts with label rendering. Show all posts
Showing posts with label rendering. Show all posts

Monday, March 26, 2012

Dynamic Ajax Content rendering in a div tag

Hi All,

I had a requirement like, where i will do asynchrounous get of data, and load the data say 10 records in a div tag. if user scroll through the div and reaches teh end of the div tag, i will remove all conents from div and load fresh contents from 11-20 in div. Like this it goes...

Now my problem,

Step 1:- 1-10 records show in div (now user scroll to end of div)

Step 2:- Remove 1-10 records show 11-20 records in div. My Question is if user wants to see 1-10 records back, i am not able to take the user to the top since the first record is at the top of the div. I can't fire any event here.

Can anyone help on this?

Thanks in advance,

Karthikeyan.

Can you poste some code? I get the idea but I want to see what even handler you are using to track the scrolling in conjunction with the records being scrolled. Perhaps also you might want to use hidden fields that put the value of the previous set of pages (in your case 1-10).


Hi,

Thank you for your post!

I suggest you keep 20 records in the div, and just display half of them.

Then, when you want get the pre 10 records, just do it like you get the next 10 Records because you can fire some events of the scroll.

If you have further questions,let me know.

Best Regards,

Dual TabContainers and background image rendering

I have a page with a main TabContainer. In the ContentTemplate of this container, there is another TabContainer serving as a subtab. The problem I am having is that when a TabPanel is clicked, the subtab background image disappears. Once you move the mouse over a TabPanel, however, it is re-painted. An image of what I am describing is below. In addition, I have all the source/images for this sample zipped at:https://secure.wellmedmedicalgroup.com/test.zip

To replicate simply click "Section B" on the subtabwithout moving the mouse. You will notice the background image disappears. Then move the mouse, and it re-appears.

This is a skeleton of the application I am designing. When there is actual content the issue is much more noticeable. You cannot force the repaint via moving the mouse until the page finishes rendering. Any thoughts on what may be causing this? The only lead I've discovered is that if I don't specify a class for the subtab I don't get this behavior, but I also cannot use a different image template which is not acceptable. My suspicion is that there is some sort of conflict between the painting of the main TabContainer and the TabContainer within it's ContentTemplate.

Background not rendering

Hi,

This is a know issue, please refer to this thread. http://forums.asp.net/t/1112126.aspx

A bugWorkItemId=10855 is opened to track this issue.

Wednesday, March 21, 2012

DropDownList Flicker, Rendering and Slow

I keep noticing a flicker on a dropdown with only three items in it. These three items don't change between postbacks, so why is the UpdatePannel rendering them again?

Also, there is a similar problem with listboxes:

UpdatePanel PartialRendering large ListBoxes
http://forums.asp.net/thread/1363249.aspx

and it looks like large listboxes and dropdowns are both taking a long time for the callback to complete. Any ideas?

Try setting the UpdatePanel's

Mode="Conditional"

to fix the UpdatePanel always rendering issue. As to flickering, not sure on that one. I haven't seen it personally, but it may be browser specific. Have you tried this in different browsers to see what the effect is?


Hi,

as Glav suggested, the DropDownList flickering is specific to IE6. It is an issue in how the browser renders boxed elements, and I think it has been fixed in IE7beta.
Regarding the rendering delay, it may be related to dynamic DOM manipulation (for a DropDownList inside an UpdatePanel, recall that it will be rendered and dynamically populated on every partial postback) thus this is not an Atlas-specific issue and also you may experience it on almost all browsers (but maybe IE will be slower than others).

Thanks Paul.

That works for a lot of things. The trouble is I have a robust, windows like UI with a lot of controls in a browser with various master-detail-detail-detail style panels, so:

  • In the simple case, having several conditional UpdatePanels handle several Controls each, the Triggers aren't too bad between UpdatePanels, but DropDownLists and ListBoxes within the same UpdatePanel still get re-rendered.

    Thanks Garbin, that's good to know

    I'm not manipulating the DropDownList at all. Even an empty list exhibits this behavior, but it does appear that Atlas is unnecessarily manipulating the DOM for DropDownLists and ListBoxes, so I would need to argue that this is anAtlas-specific issue.

    I think DropDownList and ListBoxes still need a lot of work and hopefully it will at least get looked at for the Atlas August CTP, because right now they are ridiculously slow.

    See my other post:

    UpdatePanel PartialRendering large ListBoxes
    http://forums.asp.net/thread/1363249.aspx

    From my vantage, it's a big enough of an issue where I wouldn't even consider deploying any sites done with Atlas until this improves. Maxing out the CPU on a client for any length time is just not acceptable.

    Best Regards,

    Dan


    Hi,

    dbDan:


    I'm not manipulating the DropDownList at all. Even an empty listexhibits this behavior, but it does appear that Atlas is unnecessarilymanipulating the DOM for DropDownLists and ListBoxes, so I would needto argue that this is anAtlas-specific issue.


    are you referring to the flickering issue or the slow rendering? The first one is IE-specific, while I can't think of the second one as an Atlas-specific issue, since dynamically adding 5000 items to a ListBox using pure JavaScript (no Atlas) is slowing down IE, FireFox, Opera (I didn't test it on other browsers).

    Hi Garbin,

    I'm sure you're right about the flickering, but I haven't had a chance to check out IE 7 yet.

    This post was intended to be more about "unnecessary" rendering which causes "slow" rendering to occur more often. I guess I'm looking for some way to tell the ScriptManager that certain triggers are to hide/unhide the entire panel or maybe even just one control only, so it could be a little smarter about things.

    In any case, it doesn't matter if you create a ListBox with static HTML, with JavaScript or as a Databound ListBox. It originally renders fine. But if it's in an UpdatePanel with PartialRendering enabled, the callback has some serious problems.

    This post is just part of the issue, what I consider the real problem is described better in my other post.

    http://forums.asp.net/thread/1363249.aspx

    It got a low priority. I should have called it the "Atlas Callback CPU Loop Hog" bug or something, to see if that would at least get a semi-low priority :)

    So that leaves me wondering if there is a way to get this issue/problem escalated to the point where someone will at least look at to see if its a simple fix or not.

    Thanks,

    Dan


    I have a little more info on this one. I did a release to a Windows 2003 staging server. Although the delay is still obvious, it isn't nearly as bad.

    Changing from Debug to Release mode doesn't seem to improve these ListBox and DropDownList delays on my Windows XP development machine.

    Hopefully this makes it easier to duplicate or narrow down the problem(s), but I'm not so sure they are entirely on the client side anymore.

    I just did some conditional pop-up dialogs based on the data, so I have a temporary workaround demonstration purposes, so I'm moving on to other things.

    Does anybody know if this is the best forum to be reporting Atlas bugs?

    Thanks,

    Dan


    Hi,

    you can report bugs in these forums or also in theMicrosoft Connect website.

    Thanks Garbin

    I added these two posts toMicrosoft Connect as:

    Atlas PartialRender CPU Bound/Slow with ListBoxes and DropDownLists

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=178704

    Atlas UpdatePanel Trigger for Visible/Hidden Controls

    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=178708

    BTW - Like theAtlas Weblog a lot.

    Best Regards,

    Dan

  •