Problems using AJAX Control Toolkit Dropdown Extender w/ Gridview

Discussion in 'ASP .Net' started by William Youngman, Mar 19, 2007.

  1. We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a given column. We are also using another dropdown menu that the user can use to select data using another quesry using the SelectedIndex change method. Upon initial page load everything works fine and the user is presented with a SharePoint type menu. The problem arises when the user selects another value from the filter dropdown menu - the gridview is successfully rebound with the new data however the SharePoint dropdown extender is not being recreated.

    Upon viewing the source of the html page we are noticing that the extender is still present but it still has the data from the previous query bound to it and thus can not be attached to the new cells.

    Code Snippets-

    To build dropdown extender in Gridview

    <ItemTemplate>
    <asp:Label id="lblProposalNameIdNumber" runat="server" Width="220" CssClass="menulabel">

    <%# DataBinder.Eval(Container.DataItem, "ProposalNameIdNumber")%>

    </asp:Label>

    <cc1:DropDownExtender ID="ddeProposalOptions" runat="server" TargetControlID="lblProposalNameIdNumber" DropDownControlID="DropPanel">

    </cc1:DropDownExtender>

    </ItemTemplate>

    Tried setting 'CacheDynamicResults' and 'EnableViewState' both to false but that didn't help. The problem is that the project manager and business unit really want this SharePoint 2007 type menu for the user interface so we have to figure something out.

    Any help/suggestions/tips/tricks will be greatly appreciated.

    TIA,

    Bill Youngman
    William Youngman, Mar 19, 2007
    #1
    1. Advertising

  2. William Youngman

    bruce barker Guest

    move DropPanel inside the the item template.

    -- bruce (sqlwork.com)

    William Youngman wrote:
    > We are developing an application that presents data to the user in a
    > gridview and we are using the dropdown extender to give the user a
    > SharePoint 2007 type dropdown menu attached to the cells of a given
    > column. We are also using another dropdown menu that the user can use to
    > select data using another quesry using the SelectedIndex
    > change method. Upon initial page load everything works fine and the user
    > is presented with a SharePoint type menu. The problem arises when the
    > user selects another value from the filter dropdown menu - the gridview
    > is successfully rebound with the new data however the SharePoint
    > dropdown extender is not being recreated.
    >
    > Upon viewing the source of the html page we are noticing that the
    > extender is still present but it still has the data from the previous
    > query bound to it and thus can not be attached to the new cells.
    >
    > Code Snippets-
    >
    > To build dropdown extender in Gridview
    >
    > /<ItemTemplate>/
    >
    > /<asp:Label id="lblProposalNameIdNumber" runat="server" Width="220"
    > CssClass="menulabel">/
    >
    > /<%# DataBinder.Eval(Container.DataItem, "ProposalNameIdNumber")%>/
    >
    > /</asp:Label>/
    >
    > /<cc1:DropDownExtender ID="ddeProposalOptions" runat="server"
    > TargetControlID="lblProposalNameIdNumber" DropDownControlID="DropPanel">/
    >
    > /</cc1:DropDownExtender>/
    >
    > /</ItemTemplate>/
    >
    > Tried setting 'CacheDynamicResults' and 'EnableViewState' both to false
    > but that didn't help. The problem is that the project manager and
    > business unit _really_ want this SharePoint 2007 type menu for the user
    > interface so we have to figure something out.
    >
    > Any help/suggestions/tips/tricks will be greatly appreciated.
    >
    > TIA,
    >
    > Bill Youngman
    >
    bruce barker, Mar 19, 2007
    #2
    1. Advertising

  3. I just double checked the code and it is inside of the <ItemTemplate> tag.

    "bruce barker" <> wrote in message
    news:...
    > move DropPanel inside the the item template.
    >
    > -- bruce (sqlwork.com)
    >
    > William Youngman wrote:
    >> We are developing an application that presents data to the user in a
    >> gridview and we are using the dropdown extender to give the user a
    >> SharePoint 2007 type dropdown menu attached to the cells of a given
    >> column. We are also using another dropdown menu that the user can use to
    >> select data using another quesry using the SelectedIndex change method.
    >> Upon initial page load everything works fine and the user is presented
    >> with a SharePoint type menu. The problem arises when the user selects
    >> another value from the filter dropdown menu - the gridview is
    >> successfully rebound with the new data however the SharePoint dropdown
    >> extender is not being recreated.
    >> Upon viewing the source of the html page we are noticing that the
    >> extender is still present but it still has the data from the previous
    >> query bound to it and thus can not be attached to the new cells.
    >> Code Snippets-
    >> To build dropdown extender in Gridview
    >> /<ItemTemplate>/
    >>
    >> /<asp:Label id="lblProposalNameIdNumber" runat="server" Width="220"
    >> CssClass="menulabel">/
    >>
    >> /<%# DataBinder.Eval(Container.DataItem, "ProposalNameIdNumber")%>/
    >>
    >> /</asp:Label>/
    >>
    >> /<cc1:DropDownExtender ID="ddeProposalOptions" runat="server"
    >> TargetControlID="lblProposalNameIdNumber" DropDownControlID="DropPanel">/
    >>
    >> /</cc1:DropDownExtender>/
    >>
    >> /</ItemTemplate>/
    >>
    >> Tried setting 'CacheDynamicResults' and 'EnableViewState' both to false
    >> but that didn't help. The problem is that the project manager and
    >> business unit _really_ want this SharePoint 2007 type menu for the user
    >> interface so we have to figure something out.
    >>
    >> Any help/suggestions/tips/tricks will be greatly appreciated.
    >>
    >> TIA,
    >>
    >> Bill Youngman
    >>
    William Youngman, Mar 19, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Youngman

    AJAX Dropdown extender & Gridview

    William Youngman, Mar 11, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    714
    Roland Dick
    Mar 12, 2007
  2. mark4asp
    Replies:
    1
    Views:
    1,133
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    Mar 24, 2007
  3. BillE
    Replies:
    4
    Views:
    6,826
    Thomas Hansen
    Apr 18, 2007
  4. DC
    Replies:
    0
    Views:
    461
  5. Denyus
    Replies:
    0
    Views:
    7,665
    Denyus
    Mar 5, 2009
Loading...

Share This Page