2013-03-31 73 views
1

我跟那會呈現出另一種GridView控件與從數據庫加載數據提示的單元格的gridview的,但他GridView的工具提示會顯示每一個主要的GridView控件加載時間。我想有提示GridView控件中顯示,只有當用戶將鼠標懸停的單元格。顯示工具提示WHN用戶將鼠標懸停在GridView細胞

任何想法,我怎樣才能使工具提示GridView控件中顯示,只有當用戶將鼠標懸停到電池標籤?

<asp:GridView ID="gvINCpym" runat="server" AllowSorting="True" AutoGenerateColumns="False" 
       CaptionAlign="Left" CssClass="GridViewStyle" EmptyDataText="No Record Found" 
       GridLines="None" ShowFooter="True" Width="960px" 
       AllowPaging="True"> 
    <RowStyle CssClass="RowStyle" /> 
    <EmptyDataRowStyle CssClass="EmptyRowStyle" /> 
    <Columns> 
     <asp:TemplateField HeaderText="QB (30%)"> 
      <ItemTemplate> 
       <asp:Label ID="lblQB" runat="server" Text="<%# Bind('QB') %>"></asp:Label> 
       <cc1:HoverMenuExtender ID="HoverMenuExtender1" runat="server" TargetControlID="lblQB" 
        PopupControlID="pnlQBDet" PopupPosition="Right" OffsetX="0" OffsetY="0" 
        PopDelay="25"> 
       </cc1:HoverMenuExtender> 
       <asp:Panel ID="pnlQBDet" runat="server"> 
        <asp:GridView ID="gvQBDet" runat="server"> 
        </asp:GridView> 
       </asp:Panel> 
     </ItemTemplate> 
     <HeaderStyle CssClass="HeaderStyle" Width="80px" /> 
     <ItemStyle HorizontalAlign="Right" Width="80px" /> 
     </asp:TemplateField> 
    </Columns> 
</asp:GridView> 

Private Sub gvINCpym_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles gvINCpym.RowDataBound 
Try 
    If (e.Row.RowType = DataControlRowType.DataRow) Then 
     Dim secondGrid As GridView = CType(e.Row.FindControl("gvQBDet"), GridView) 

     MsFg2.gvSql = 
      "SELECT SUBSTRING(CONVERT(VARCHAR(11), DATE1, 113), 4, 8) AS CalcMnth, AMT2 AS QB, AMT3 AS KB " & _ 
      "FROM dbo.Inc_Bonus_Tran NOLOCK " & _ 
      "WHERE (DATE2 BETWEEN '" & CVRMgr.getDateSQL(txtDtFrm.Text) & "' AND '" & CVRMgr.getDateSQL(txtDtTo.Text) & "') " & _ 
      "AND TYPE = 'INC' AND SUBTYPE = 'T2' " & _ 
      "AND STAFFID = '" & rowView("StfID") & "'" 


     MsFg2.CreateDataTable(DB, MsFg2.gvSql, cnnVLD, True, True) 
     Session(MsFg2Ses) = MsFg2.gvDataTable.DefaultView.ToTable 

     secondGrid.DataSource = Session(MsFg2Ses) 
     secondGrid.DataBind() 
    End If 
Catch ex As Exception 
    cMessageManagerAlertOnly.ErrorMsgAlert(ex.Message, Me.Page) 
End Try 
End Sub 

回答

1

管理找出解決方案。將需要隱藏面板,「pnlQBDet」與CSS爲了使GridView的提示不顯示在頁面加載/回發。

<style type="text/css"> 
.PopupMenu 
{ 
    display: none; 
} 
</style> 
相關問題