Nettiers里的GridViewSearchPanel是个比较好用的控件,里面设置FieldsToExclue如下:

<data:GridViewSearchPanel ID="GridViewSearchPanel1" runat="server" GridViewControlID="GridView1" PersistenceMethod="Session" >
        <FieldsToExclude>
        <data:Field Value="TypeId" />
        </FieldsToExclude>
        </data:GridViewSearchPanel>

即把要排除的列名包含在FieldsToExclude里面。

另外,要使的搜索的列名显示为中文,修改gridviewseachpanel.cs文件里面的 CreateChildControls()方法里面li.Text = EntityHelper.GetPascalSpacedName(cea.Name)为li.Text = EntityHelper.GetEnumTextValue((Enum)c.GetValue(i));

再在entity里把列的特性改为中文。

相关文章:

  • 2021-08-02
  • 2022-12-23
  • 2021-07-12
  • 2022-03-08
  • 2021-12-04
  • 2022-03-08
  • 2021-08-04
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-22
  • 2022-01-18
  • 2021-11-23
相关资源
相似解决方案