Disable Adapter for a certain control or DataList without table RRS feed

  • Question

  • User-589644965 posted

    Hi all,

    How is it possible to disable the css friendly for a certain control? For example for a derived DataList control? I would like to achieve the following:

     <table class="silver">
                                <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
                                <esc:EviDataList ID="dlComponents" runat="server" RepeatLayout="Flow">
                                            <td class="silver">
                                                <asp:Literal ID="ltHardwarePin" runat="server" Text='<%#Eval("HardwarePin") %>' />
                                        <esc:EviPager ID="ePager" runat="server" />

    Because I want to use user controls for the header and the footer later on i need the DataList just to render the declared content and no automatic tables around it.

     Edit: for sure i can comment the entry in the CSSFriendlyAdapterBrowser

     <!--<adapter controlType="System.Web.UI.WebControls.DataList"
                   adapterType="CSSFriendly.DataListAdapter" />--> 

    But there must be a better solution for specific control instances.


    Thursday, August 28, 2008 9:36 AM

All replies

  • User-1385398420 posted

    Subclass the DataList, and use the subclass, which will not be adapted.

    1. Create a new class, called StandardDataList, and inherit from the default ASP.Net DataList class.
    2. When you want a non-adapted DataList, use your StandardDataList class.


    Friday, August 29, 2008 3:28 PM