我有以下代碼...如何將工具提示添加到綁定列在一個DetailsView,但只有當列的顏色已經改變
<asp:DetailsView ID="dvApprenticeship" runat="server" DataSourceID="dsApprenticeship" AutoGenerateRows="false" BackColor="#E0E8F0" GridLines="None" CellPadding="2"
DataKeyNames="ProgramID, ProgramName, OrganisationName, StudyYearID, Workgroup, Pathway, FinishDate" OnDataBound="Apprenticeship_DataBound">
<Fields>
<asp:BoundField DataField="ProgramName" HeaderText="Program:" />
<asp:BoundField DataField="StudyYearName" HeaderText="Study Year:" />
<asp:HyperLinkField DataTextField="OrganisationName" HeaderText="Apprenticeship: " NavigateUrl="Apprenticeships.aspx" />
<asp:BoundField DataField="Workgroup" HeaderText="Workgroup:" />
<asp:BoundField DataField="Pathway" HeaderText="Pathway:" />
<asp:TemplateField HeaderText="Nominal Completion: ">
<ItemTemplate>
<asp:Label ID="labEndDate" runat="server" Text='<%# Eval("FinishDate","{0:d/MM/yyyy}") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Fields>
<FooterTemplate>
<asp:LinkButton ID="lbAddProgramUnits" runat="server" OnClick="AddProgramUnits_Click" ForeColor="White" Font-Bold="true"
OnClientClick="return confirm('Import the Program Units listed - this may overwrite unit dates. Are you sure?');">Import from Program</asp:LinkButton>
<a href="#" onclick="showhelp('progimphelp');" style="color:White;font-weight:bold;">Help</a>
</FooterTemplate>
<FooterStyle HorizontalAlign="Center" BackColor="LightSlateGray" />
</asp:DetailsView>
我希望能夠顯示工具提示時的一個Boundfields上面已經改變了顏色。
在我的C#代碼隱藏中,我有代碼根據數據的某些條件更改這些綁定字段的顏色。這工作正常。
但我想要的是能夠給用戶一個提示當過他們將其鼠標在這些綁定列且僅當此場不同的着色,在我的情況
color.Yellow
。
謝謝!一些如此簡單。我不知道這個屬性。 – Fandango68
我知道這是一箇舊的帖子,但有沒有辦法將css添加到工具提示, – JustLearning
@CosmosBanda搜索網站或單獨提出您的問題......我們並沒有真正回答評論中的無關問題以回答一個不同的問題。 – ethorn10