我想要做這樣的事情有一個GridView:設置CommandField中選擇公開程度從aspx頁面
<asp:CommandField ShowSelectButton="True" Visible='<%# return Eval("SC_TABLE") %>' />
但是,這並不工作,未來與錯誤:
Databinding expressions are only supported on objects that have a DataBinding event. System.Web.UI.WebControls.CommandField does not have a DataBinding event.
反正是有我可以從aspx頁面設置可見性? PS:SC_TABLE存在於數據源中,因此該部分沒有任何錯誤。
+1:我希望能用CommandField做到這一點。我已經知道這種方式,但它仍然有幫助。哦,看起來CommandField是不可能的。 :( – waqasahmed 2009-07-16 15:30:41