1

我已将我的网格列定义如下,

WebGridColumn colRequestorEmail= new WebGridColumn();
colRequestorEmail.ColumnName = "RequestorEmail";
colRequestorEmail.Header = "Requestor Email Id";
colRequestorEmail.CanSort = true;
colRequestorEmail.Style = "name";

和我的CSS如下,

.name { width: 0px;visibility: hidden; }

我仍然可以看到我想隐藏的列吗?

4

1 回答 1

-1

您在此处添加一个 css 名称并使用您的 css 文件设置实际属性

  // Summary:
    //     Gets or sets the CSS class attribute that is rendered as part of the HTML table
    //     cells that are associated with the System.Web.Helpers.WebGrid column.
    //
    // Returns:
    //     The CSS class attribute that is applied to cells that are associated with the
    //     column.
于 2018-07-31T21:00:22.280 回答