I have a content page (inside a masterpage) which must use postbacks on the TreeView component. I have seen from existing posts that this is currently being looked into and experimented with.
So I need to disable only the TreeView Adapter from this content page. Is there a way to override the default settings from the browser file? I have tried a few things on Page_Init & PreRender that were unsuccesful. [:(]
This might be a simple one to answer so I hope you can help. [:)]
There is presently no known way to tell the framework to not use the adapter for one particular TreeView. As you noted, we are working on some ideas for how to get around this limitation to some degree but that work is not yet complete.
However, you seemed to say that you would be OK if the whole page were set up to not use adapters (or not use the TreeView adapter). If that is the case, then you might want to experiment with using something like the code you see in the kit's App_Code\SiteSpecific\DynamicAdaptersPage.cs
file. Take a look at its OnPreInit and OnUnload methods. Do you see how they disable and restore the adapters under some conditions. You could do likewise in the OnPreInit and OnUnload of your specific page. Rather than disabling and restoring all adapters,
however, you page could try to disable just the TreeView adapter.
This will, of course, disable the adapter's influence throughout the page (all TreeViews, for example). But if that is OK with you, then this strategy may work for you.
That's awesome, Gav. I'm glad you were able to take my vague instructions above and turn them into something that worked for you. Nicely done, nicely done.
Hi, I have the release version of css friendly adapter. An issue that I think hasn't been solved yet is the StaticDisplayLevels. Is there any workaround for this? because this is very important property that many people will use. I saw in WebControlAdapterExtender.cs
that there is a public property AdapterEnabled. If i set it to false, it renders the menu control as span and i can not see any dropdown effect for leaf nodes working. How can i disabled the adapter for particular control which not working properly such as
menu control ignores StaticDisplayLevels.
Hi, I have the release version of css friendly adapter. An issue that I think hasn't been solved yet is the StaticDisplayLevels. Is there any workaround for this? because this is very important property that many people will use. I saw in WebControlAdapterExtender.cs
that there is a public property AdapterEnabled. If i set it to false, it renders the menu control as span and i can not see any dropdown effect for leaf nodes working. How can i disabled the adapter for particular control which not working properly such as
menu control ignores StaticDisplayLevels.
Hi Dan, the short answer is "no" but it's something I will try to bring up with friends and colleagues on the ASP.NET team. Fundamentally, they need to expose per-control adaption from within the ASP.NET framework. There really isn't any way for adapter
developers to work around this because the framework simply wasn't built (initially) to support per-control adaption. Still, I believe it could be done... if you tweaked the framework sufficiently.
I was useing CssAdapter Menu in my site. It was working Fine! But in a directory/place of the site I wanted the menu to appear as is default of framework.
in the menu declaration i put AdapterEnabled="false"
And It worked. The menu is now rendered as .NET Default.
widget73
Member
10 Points
2 Posts
Disabling Adapters
Jun 30, 2006 11:06 AM|LINK
Hi,
I have a content page (inside a masterpage) which must use postbacks on the TreeView component. I have seen from existing posts that this is currently being looked into and experimented with.
So I need to disable only the TreeView Adapter from this content page. Is there a way to override the default settings from the browser file? I have tried a few things on Page_Init & PreRender that were unsuccesful. [:(]
This might be a simple one to answer so I hope you can help. [:)]
Thanks,
Gav
Russ Helfand
Contributor
3304 Points
744 Posts
Re: Disabling Adapters
Jun 30, 2006 03:10 PM|LINK
There is presently no known way to tell the framework to not use the adapter for one particular TreeView. As you noted, we are working on some ideas for how to get around this limitation to some degree but that work is not yet complete.
However, you seemed to say that you would be OK if the whole page were set up to not use adapters (or not use the TreeView adapter). If that is the case, then you might want to experiment with using something like the code you see in the kit's App_Code\SiteSpecific\DynamicAdaptersPage.cs file. Take a look at its OnPreInit and OnUnload methods. Do you see how they disable and restore the adapters under some conditions. You could do likewise in the OnPreInit and OnUnload of your specific page. Rather than disabling and restoring all adapters, however, you page could try to disable just the TreeView adapter.
This will, of course, disable the adapter's influence throughout the page (all TreeViews, for example). But if that is OK with you, then this strategy may work for you.
Groovybits.com
widget73
Member
10 Points
2 Posts
Re: Disabling Adapters
Jul 05, 2006 10:05 AM|LINK
Thanks Russ, That worked a treat! It disabled it just for this page.
Keep up the good work [:D]
Gav
Russ Helfand
Contributor
3304 Points
744 Posts
Re: Disabling Adapters
Jul 05, 2006 04:49 PM|LINK
Groovybits.com
wahyu
Member
298 Points
81 Posts
Re: Disabling Adapters
Nov 30, 2006 02:21 PM|LINK
Hi, I have the release version of css friendly adapter. An issue that I think hasn't been solved yet is the StaticDisplayLevels. Is there any workaround for this? because this is very important property that many people will use. I saw in WebControlAdapterExtender.cs that there is a public property AdapterEnabled. If i set it to false, it renders the menu control as span and i can not see any dropdown effect for leaf nodes working. How can i disabled the adapter for particular control which not working properly such as menu control ignores StaticDisplayLevels.
thanks
wahyu
Member
298 Points
81 Posts
Re: Disabling Adapters
Nov 30, 2006 03:19 PM|LINK
Hi, I have the release version of css friendly adapter. An issue that I think hasn't been solved yet is the StaticDisplayLevels. Is there any workaround for this? because this is very important property that many people will use. I saw in WebControlAdapterExtender.cs that there is a public property AdapterEnabled. If i set it to false, it renders the menu control as span and i can not see any dropdown effect for leaf nodes working. How can i disabled the adapter for particular control which not working properly such as menu control ignores StaticDisplayLevels.
thanks
Russ Helfand
Contributor
3304 Points
744 Posts
Re: Disabling Adapters
Nov 30, 2006 04:47 PM|LINK
Sorry but per control adaption doesn't work in most cases. I tried to warn everyone about this, http://www.asp.net/cssadapters/whitepaper.aspx#SamplesDisablingAdapters. I feel your pain but so far I've not been able to find a solution for this sort of scenario.
Groovybits.com
DannyDep
Member
749 Points
316 Posts
Re: Disabling Adapters
Jan 08, 2007 06:25 PM|LINK
Hi Russ,
Is there any update as to a possible future solution for "per" control adaption?
thx,
ciao, dan
Russ Helfand
Contributor
3304 Points
744 Posts
Re: Disabling Adapters
Jan 10, 2007 04:31 PM|LINK
Hi Dan, the short answer is "no" but it's something I will try to bring up with friends and colleagues on the ASP.NET team. Fundamentally, they need to expose per-control adaption from within the ASP.NET framework. There really isn't any way for adapter developers to work around this because the framework simply wasn't built (initially) to support per-control adaption. Still, I believe it could be done... if you tweaked the framework sufficiently.
As I said, I'll bring this up to folks at MS.
Groovybits.com
asifcs
Member
132 Points
33 Posts
Re: Disabling Adapters
Jan 17, 2007 10:59 AM|LINK
I was useing CssAdapter Menu in my site. It was working Fine! But in a directory/place of the site I wanted the menu to appear as is default of framework.
in the menu declaration i put AdapterEnabled="false" And It worked. The menu is now rendered as .NET Default.
Thanks Russ Helfand. I found the idea in http://www.asp.net/cssadapters/whitepaper.aspx#SamplesDisablingAdapters.