0

我是 c# 新手,我正在尝试使用一些已经构建的代码。当有人单击表格的列标题时,我想将鼠标悬停在 blubble 上。我有以下代码。在下面的示例中,其中一列具有标题 ID,下面是我的表的一些数据。假设用户将鼠标悬停或单击“ID”标题。我想在屏幕上悬停显示一些文本。有任何想法吗?我做了一些研究,但我找不到任何有效的方法。我正在尝试决定是否只需要重写表格。我做的一件事是添加类似这样的内容 .Attributes(c => new Dictionary { { "class", "tooltip" }, { "data-content", ".tooltip-content" } }); 但这会弹出标题下方的单元格,但不会添加标题。

@Html.Pager((IPagination)Model.CustomersWithCurrentVolumes)

@(Html.Grid(Model.CustomersWithCurrentVolumes)
   .Columns(col =>
  {
    col.For(c => c.Customer.Generation).Named("Generation"); 
    col.For(c => c.Customer.Level).Named("LVL");
    col.For(c => c.Customer.CustomerID).Named("ID");
    col.Custom(c => c.Customer.FirstName).Named("First Name"); 
4

0 回答 0