Click here to Skip to main content
13,351,971 members (80,688 online)
Rate this:
Please Sign up or sign in to vote.
See more:
i have a grid view,which show some data,
i want that when i mouse hover on that LabelTital, then show two button(edit & delete) below the label,
so plz help me, my code is below

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false"       

                       Offer Title
                           <asp:Label ID="LabelTital" runat="server"    Text='<%#bind("title") %>'></asp:Label>


Posted 5-Dec-12 1:18am
Updated 5-Dec-12 1:22am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

<script src="jquery-1.8.0.min.js" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $(".grdinvoicecss").mousemove(function (e) {
                var o = {
                    left: e.clientX,
                    top: e.clientY

<asp:gridview id="grdInvoice1" runat="server" autogeneratecolumns="False" showheader="true" width="100%" backcolor="#EFEFEF" gridlines="None" datakeynames="invoice_id" onrowdatabound="grdInvoice1_RowDataBound" xmlns:asp="#unknown">
<columns> <asp:templatefield>

Customer name
Invoice No
Tax Amount

<asp:panel runat="server" id="ItemContainer">

style="cursor: pointer">
<%# Eval("customer_name") %>
<%# Eval("invoice_date", "{0:dd/MM/yyyy}") %>
<%# Eval("invoice_no") %>
<%# Eval("sub_total") %>
<%# Eval("tax_amount") %>
<%# Eval("discount") %>

<asp:panel id="popupMenu" cssclass="popupmenucss" runat="server" style="height: 67px;<br mode=" hold=" /> width: 120px; padding-top: 10px; border-color: #00BFFF; background-color: #eeeeee;<br mode=">
<asp:linkbutton id="lkedit" text="Edit" commandname="Select" style="margin-left: 10px;">
onmouseover="'#00BFFF';" OnClick="grdInvoice1_SelectedIndexChanged2"
onmouseout="'black'" ForeColor="black" runat="server">

<asp:linkbutton id="lkpreview" text="Preview Report" onmouseover="'#00BFFF'">
onmouseout="'black'" Style="margin-left: 10px;" OnClick="lkpreview_Click"
ForeColor="black" runat="server">

<asp:linkbutton id="lkpdf" text="DownLoad PDF" onmouseover="'#00BFFF'">
onmouseout="'black'" Style="margin-left: 10px;" ForeColor="black"
runat="server" OnClick="lkPDF_Click">

<asp:hovermenuextender runat="server" targetcontrolid="ItemContainer" popupcontrolid="popupMenu">
PopupPosition="Center" OffsetX="50" OffsetY="-20">

Arun1990 5-Dec-12 6:31am
i don't understand any thing in your code,plz teach me step by step how it work
RahulRana723 5-Dec-12 6:43am
Main Code Is Below:
<asp:hovermenuextender runat="server" targetcontrolid="ItemContainer" popupcontrolid="popupMenu">
PopupPosition="Center" OffsetX="50" OffsetY="-20">
RahulRana723 5-Dec-12 6:44am
You can use HoverMenuExtender from AjaxControl toolkit.
Arun1990 5-Dec-12 6:47am
HoverMenuExtender work fine thanks,plz put this answer in next solution then i will accept your solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.180111.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100