Apr 07, 2010, 2:58 AM
[CLOSED] [1.0] Ability to register Scripts for a Component without having any instance of it on the Page
In my case, I have a page, that does not have any GridPanel on it, when the page is initially rendered. However, depending upon user interaction, I need to create new Ext.net.GridPanel on client-side.
The problem is that the Grid resources are not on the page, as it did not had any instance of it on the page during initial page load. Here I am looking for 2 solutions:
1) Ability to register Component resources manually, with something like:
My current workaround is to add a Hidden GridPanel to page on load.
2) Something sort of MSDN (http://msdn.microsoft.com/en-us/libr...exception.aspx)
It would be very useful if I can add scripts manually like in
The problem is that the Grid resources are not on the page, as it did not had any instance of it on the page during initial page load. Here I am looking for 2 solutions:
1) Ability to register Component resources manually, with something like:
resourceManager1.RegisterResources<GridPanel>();
I know this can be troublesome to achieve. I studied the code to notice that each successive derived class overrides the Resources property, and adds its own to the base class' resources. The above request would need some kind of a static method on the Component class, and there are obvious restrictions on static method overriding :(My current workaround is to add a Hidden GridPanel to page on load.
2) Something sort of MSDN (http://msdn.microsoft.com/en-us/libr...exception.aspx)
It would be very useful if I can add scripts manually like in
<script type="text/javascript src="/Ext.Net.GridPanel/coolite.axd"></script>
For the second point above, I am not sure whether it is at all practical (a Component might require multiple scripts/css files to be registered on page).
Last edited by geoffrey.mcgill; Feb 22, 2011 at 5:13 AM.