报错贴出来!
其实晚绑定很影响页面的执行效率,建议用存储过程解决这样的问题!在SQL里面筛选就简单多了!

解决方案 »

  1.   

    Compilation Error 
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: CS0117: 'System.Web.UI.WebControls.TemplateColumn' does not contain a definition for 'DataBinding'Source Error:
    Line 275: <asp:templatecolumn Visible='<%#(Convert.ToString(DataBinder.Eval(Container.DataItem,"anclassid"))=="22")?false:true%>' HeaderText="
      

  2.   

    报错说:teplatecolumn没有DataBinding属性。
    动态生成列确实快,但我要改的话代码太多了,我是新手,没把握啊:(
      

  3.   

    我再说一遍我要的效果:这是一个信息表,发布各种信息用的,但是企业信息也存在这表里面(就不要问为什么这么建表了)。如果取出的是非企业信息如广告则显示价格(jia),若是企业信息则不显示价格。注意:连teplatecolumn的header text(“价格”)也不显示(就是这点!!!),所以我想控制teplatecolumn的visible。