PDA

View Full Version : [CLOSED] Loading UserControls with UserControlLoader --Version Ext.NET.MVC.Pro.2.1.1



ontiv
Feb 07, 2013, 10:25 AM
Hello,

I have in my application a few speed issues.
At Page (View),I load at runtime several instances of a UserControl( .ascx with UserControlLoader)in
my Panel.

One can imagine the UserControl as a contribution to a profile in Facebook. This UserControl has many functions.
I have the opportunity to build this client side. This also works well.

But the problem is, for many controls will my contribution-container(panel) slowly.
For example,the insert a text box in this panel by jscript takes an eternity until it sees
and the browser has rendered finish...

Have you any ideas for a solution to this problem ??

Thanks for helping!

Daniil
Feb 07, 2013, 11:53 AM
Hi @ontiv,

Please demonstrate how you add a test box.

ontiv
Feb 07, 2013, 2:51 PM
Hi Daniil,

but that was just an example of many...
.js


var AddPanel = function () {

var p_addpanel = new Ext.Panel({
height: 100
});

Ext.getCmp('p_contributionlist').add(p_addpanel);
}


All actions are influencing the content of the panel are slowly.

Examples:
-The height of an UserControls is changing...
-I delete a UserControl
-I add a panel
-I show or hide an UserControl or an another element

I hope you know what I mean :)

That does not happen when I add just a lot of panels (ext:Panel) on the client side. I think
it has to do with the UserControlLoader and UserControls..

Thanks

Daniil
Feb 07, 2013, 3:23 PM
Could you test it with the Ext.NET sources from SVN trunk?

There were some improvements regarding this part.

ontiv
Feb 07, 2013, 3:25 PM
The structure of my view is similar to this guestbook here :

5569

Can you give me some hints to build a chronologicial list like your guestbook (or any other blog).

I need a container that gives me a lot of possibilities to design my own items (UserControls)
and in the same time the best performance as possible (to handle big data, lazy loading, loading by scrolling, paging).

Daniil
Feb 07, 2013, 4:52 PM
ASP.NET Repeater, Ext.NET DataView or XRender mechanism can be an option.

It is hard to say what would be the best option.

Maybe, the option that you currently use is not bad. Please provide a sample to reproduce the problem, we would be happy to try to improve the performance.


loading by scrolling

If you mean infinite scrolling in GridPanel, then it is only available for grids and trees (> v2.1).


I need a container that gives me a lot of possibilities to design my own items (UserControls)

Design? Please clarify.

ontiv
Feb 08, 2013, 11:25 AM
Hi,


If you mean infinite scrolling in GridPanel, then it is only available for grids and trees (> v2.1).

I mean "loading by scrolling" like this http://www.aspsnippets.com/demos/288/


Design? Please clarify.

The build of different templates or usercontrols and display them in one container

Daniil
Feb 08, 2013, 12:37 PM
Thanks for clarification.

There is no ready solution for this, but it all should be possible.

ontiv
Feb 08, 2013, 3:23 PM
ASP.NET Repeater, Ext.NET DataView or XRender mechanism can be an option.

I have already noticed that the DataView is very fast, but is there a way to add the templates dynamically to DataView ?
because the problem is that I have several items..

Another question...Can I build the template from DataView with Ext.Net controls ? or only asp ?

Thanks

Daniil
Feb 08, 2013, 5:01 PM
I have already noticed that the DataView is very fast, but is there a way to add the templates dynamically to DataView ?
because the problem is that I have several items..

Another question...Can I build the template from DataView with Ext.Net controls ? or only asp ?

Well, a DataView now supports Ext.NET controls (very recent enhancement), but it is not recommended to use for rendering many complex items.

Maybe, for your case XRender is better.

ontiv
Feb 11, 2013, 10:28 AM
Hi Daniil,

Thanks for clarification!

I've checked out the svn trunk...

5582

but is that the latest version ??

Daniil
Feb 11, 2013, 10:33 AM
If you got the sources from this link, then yes, it is the latest version.
http://svn.ext.net/premium/trunk/

ontiv
Feb 11, 2013, 10:45 AM
Could you test it with the Ext.NET sources from SVN trunk?

There were some improvements regarding this part.

these changes are there?

Daniil
Feb 11, 2013, 10:51 AM
Yes, there are.

ontiv
Feb 11, 2013, 3:23 PM
The current version has not fixed the problem.

I think that I need to look for other solutions....

Is there a control, which can be passed to finshed hmdl code ?

My idea is to generate this code on the server side and add this to a container or panel !?

Daniil
Feb 11, 2013, 4:27 PM
The current version has not fixed the problem.


We would be happy to investigate a sample which reproduces the problem.



Is there a control, which can be passed to finshed hmdl code ?

My idea is to generate this code on the server side and add this to a container or panel !?

Sorry, the requirement is unclear for me. Could you elaborate?

ontiv
Feb 12, 2013, 7:22 AM
Thanks for your help!


Sorry, the requirement is unclear for me. Could you elaborate?

Sorry my mistake, I mean html code. Is it possible to add html-code at runtime to a
panel with a finished item collection ?

Daniil
Feb 12, 2013, 10:48 AM
Setting up the Panel's Html property can help. It applies a string.

ontiv
Feb 12, 2013, 1:02 PM
How can I check if a panel scroll down ?

like this :



$(window).scroll(function () {
if ($(window).scrollTop() == $(document).height() - $(window).height()) {
alert();
}
});

Daniil
Feb 12, 2013, 2:49 PM
This question seems not to be too much related to the intial topic.

Could you start a new forum thread, please?

ontiv
Feb 12, 2013, 2:55 PM
sure, no problem !

Daniil
Feb 12, 2013, 3:03 PM
Thank you.

Do you mind we will mark the current thread as closed?

ontiv
Feb 13, 2013, 8:59 AM
Yes you can close it for now...