web Grid列传递样式类

时间:2016-03-22 10:57:24

标签: html css asp.net-mvc webgrid mvcgrid

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

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

和我的CSS如下,

df = pandas.DataFrame(numpy.linspace(1, 7, 7), columns=['guess'])
correct_row_index = 3
df['cumulative_error'] = 0
for i in range(correct_row_index - 1, -1, -1):
    df.iloc[i, df.columns.get_loc('cumulative_error')] = abs(df['guess'].iloc[i] - df['guess'].iloc[i + 1]) + df['cumulative_error'].iloc[i + 1]
for i in range(correct_row_index + 1, len(df), 1):
    df.iloc[i, df.columns.get_loc('cumulative_error')] = abs(df['guess'].iloc[i] - df['guess'].iloc[i - 1]) +   df['cumulative_error'].iloc[i - 1]

我仍然能够看到我想要隐藏的列?

1 个答案:

答案 0 :(得分:-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.