How to hide a TemplateField column in a GridView

前端 未结 9 1830
遇见更好的自我
遇见更好的自我 2020-12-03 04:13

How can I hide a TemplateField column in a GridView?

I tried the following:



        
9条回答
  •  萌比男神i
    2020-12-03 05:17

    If appears to me that rows where Visible is set to false won't be accessible, that they are removed from the DOM rather than hidden, so I also used the Display: None approach. In my case, I wanted to have a hidden column that contained the key of the Row. To me, this declarative approach is a little cleaner than some of the other approaches that use code.

    
    
    
     <%--ROW ID--%>
          
           
           
           
           
           
           
           
           
           
          
    

提交回复
热议问题