hovermenu and triggers

Last post 11-05-2006 9:04 PM by jweepin. 4 replies.

Sort Posts:

  • hovermenu and triggers

    09-28-2006, 9:59 PM
    • Member
      5 point Member
    • ktana
    • Member since 09-29-2006, 1:40 AM
    • Posts 1

    Hello

    I have a GridView with a hovermenu that works fine, but when  insert a trigger  for the update panel ( it's a master detail page )  thehovermenu panel is rendered like a normal panel inside every cell of the grid.

    I tried placing the master and details controls in the same update panel (without using a trigger) but the same result. I tried nested updatepanels but didnt work.

    Does anybody have an ideea for this problem ?

     

     Thanks a lot

    k

  • Re: hovermenu and triggers

    10-05-2006, 8:16 PM
    • Contributor
      4,198 point Contributor
    • Ted Glaza [MSFT]
    • Member since 04-12-2006, 11:51 PM
    • Microsoft
    • Posts 847
    • AspNetTeam

    Hi ktana,

    Could you post a small code sample that shows this happening so we can take a closer look at it?

    Thanks,
    Ted

    This posting is provided "AS IS" with no warranties, and confers no rights.
  • Re: hovermenu and triggers

    11-03-2006, 5:13 AM
    • Member
      70 point Member
    • jweepin
    • Member since 03-22-2004, 9:49 PM
    • Posts 14

    Hi Ted, pls comment on my work.. i found that if HoverMenu doesn't work in GridView as shown in the sample, the Image1 will shown if i dun hide it and it wun show even i hover on the Panel2 if i hide it..but its working outside of the gridview.  

     Thanks in advance!

    <%

    @ Page Language="VB" AutoEventWireup="false" CodeFile="HoverMenu.aspx.vb" Inherits="HoverMenu" %>

    <%

    @ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>

    <!

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <

    html xmlns="http://www.w3.org/1999/xhtml" >

    <

    head runat="server">

    <title>Untitled Page</title>

    <style type="text/css">

    .popupMenu

    {

    position:absolute;

    visibility:hidden;

    background-color:#F5F7F8;

    opacity:.9;

    filter: alpha(opacity=90);

    }

    .popupHover

    {

    background-image:url(image/hutch.gif);

    background-repeat:repeat-x;

    background-position:left top;

    background-color:#F5F7F8;

    }

    </style>

    </

    head>

    <

    body >

    <form id="form1" runat="server">

    <asp:ScriptManager ID="ScriptManager1" EnablePartialRendering="False" runat="server">

    </asp:ScriptManager>

    <div>

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">

    <ContentTemplate>

    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="TestID"

    DataSourceID="SqlDataSource1" ShowHeader="False">

    <Columns>

    <asp:TemplateField>

    <ItemTemplate>

    <asp:Panel ID="Panel2" runat="server">

    <table width="100%">

    <tr>

    <td width="25%"><asp:Label Font-Bold="true" ID="Label1" runat="server" Text='<%# Eval("TestID") %>'></asp:Label></td>

    <td width="25%"><asp:Label ID="Label2" runat="server" Text='<%# Eval("TestName") %>'></asp:Label></td>

    <td width="50%"><asp:Label ID="Label3" runat="server" Text='<%# Eval("TestDate") %>'></asp:Label></td>

    </tr>

    </table>

    </asp:Panel>

    <asp:Panel ID="Panel3" runat="server" CssClass="popupMenu">

    <asp:Image ID="Image1" ImageUrl='<%# Eval("TestDesc") %>' runat="server" />

    </asp:Panel>

    <ajax:HoverMenuExtender ID="HoverMenuExtender1" runat="server" HoverCssClass="popupHover" TargetControlID="Panel2" PopupControlID="Panel3" PopupPosition="Right">

    </ajax:HoverMenuExtender>

    </ItemTemplate>

    </asp:TemplateField>

    </Columns>

    </asp:GridView>

    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="Data Source=(local);Initial Catalog=[limjp]Test;Persist Security Info=True;User ID=limjp;Password=limjp"

    ProviderName="System.Data.SqlClient" SelectCommand="SELECT * FROM [tbl_test]"></asp:SqlDataSource>

    </ContentTemplate>

    </asp:UpdatePanel>

    <span id="hvr_important">This is important.</span>

    <asp:Label runat="server" ID="lbl_important" Text="Important" />

    <ajax:HoverMenuExtender runat="server" ID="hme" TargetControlID="lbl_important" PopupControlID="hvr_important" PopupPosition="top" />

     

    <asp:Label ID="MyLabel1" Text="Test" runat="server"></asp:Label>

    <asp:Label ID="MyLabel2" Text="OK" runat="server"></asp:Label>

    <ajax:HoverMenuExtender ID="MyHover1" TargetControlID="MyLabel1" PopupControlID="MyLabel2" PopupPosition="Right" runat="server" />

    </div>

    </form>

    </

    body>

    </

    html>
  • Re: hovermenu and triggers

    11-03-2006, 11:56 AM
    • Member
      68 point Member
    • denloof
    • Member since 10-29-2006, 1:31 AM
    • Posts 16

    For what it's worth, I had the same problem.

    Strange thing was, I had 2 gridviews on one page, one worked the other only worked after 1 postback.

    Couldn't figure it out, even if the gridview was placed on its own page it still didn't work correctly after the first postback. One thing to note (I don't know if it's important) is that the gridview that didn't work correct returned way more records than the one that worked.

    Also try to do a databind in the pageload or prerender, that seemed to help somewhat (not enought for me...).

     

    denloof

     

  • Re: hovermenu and triggers

    11-05-2006, 9:04 PM
    • Member
      70 point Member
    • jweepin
    • Member since 03-22-2004, 9:49 PM
    • Posts 14

    DenLoof,

     Mine not working at all in gridview, but its working fine outta grid..

     can u post ur code so that i can refer on it.. maybe i missed out something important yet not an obvious one

     THX

     jweepin

Page 1 of 1 (5 items)