Disabling Adapters

Last post 01-17-2007 6:59 AM by asifcs. 9 replies.

Sort Posts:

  • Disabling Adapters

    06-30-2006, 7:06 AM
    • Member
      10 point Member
    • widget73
    • Member since 06-30-2006, 10:56 AM
    • Posts 2

    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. Sad

    This might be a simple one to answer so I hope you can help. Smile

    Thanks,

    Gav

  • Re: Disabling Adapters

    06-30-2006, 11:10 AM
    • Contributor
      3,298 point Contributor
    • Russ Helfand
    • Member since 09-14-2005, 6:22 PM
    • Groovybits.com
    • Posts 741

    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.

    Russ Helfand
    Groovybits.com
  • Re: Disabling Adapters

    07-05-2006, 6:05 AM
    • Member
      10 point Member
    • widget73
    • Member since 06-30-2006, 10:56 AM
    • Posts 2

    Thanks Russ, That worked a treat! It disabled it just for this page.

    Keep up the good work Big Smile

    Gav

     

     

  • Re: Disabling Adapters

    07-05-2006, 12:49 PM
    • Contributor
      3,298 point Contributor
    • Russ Helfand
    • Member since 09-14-2005, 6:22 PM
    • Groovybits.com
    • Posts 741
    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.
    Russ Helfand
    Groovybits.com
  • Re: Disabling Adapters

    11-30-2006, 10:21 AM
    • Member
      298 point Member
    • wahyu
    • Member since 05-02-2005, 3:55 PM
    • Posts 81

    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 

  • Re: Disabling Adapters

    11-30-2006, 11:19 AM
    • Member
      298 point Member
    • wahyu
    • Member since 05-02-2005, 3:55 PM
    • Posts 81

    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 

  • Re: Disabling Adapters

    11-30-2006, 12:47 PM
    • Contributor
      3,298 point Contributor
    • Russ Helfand
    • Member since 09-14-2005, 6:22 PM
    • Groovybits.com
    • Posts 741

    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.

    Russ Helfand
    Groovybits.com
  • Re: Disabling Adapters

    01-08-2007, 2:25 PM
    • Member
      749 point Member
    • DannyDep
    • Member since 10-18-2005, 11:40 PM
    • Posts 316
    Russ Helfand:

    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.

    Hi Russ,

    Is there any update as to a possible future solution for "per" control adaption?

     

    thx,

    ciao, dan

     

     

  • Re: Disabling Adapters

    01-10-2007, 12:31 PM
    • Contributor
      3,298 point Contributor
    • Russ Helfand
    • Member since 09-14-2005, 6:22 PM
    • Groovybits.com
    • Posts 741

    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.

    Russ Helfand
    Groovybits.com
  • Re: Disabling Adapters

    01-17-2007, 6:59 AM
    • Member
      132 point Member
    • asifcs
    • Member since 06-05-2003, 5:29 AM
    • Dhaka, Bangladesh
    • Posts 33

    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.

    -Syed Moshiur Murshed
Page 1 of 1 (10 items)