|
Add a BoundField to the compilation method, use the Insert method to add to the GirdView's Columns, and the RowCommand event of the GirdView will not work. Use the add method to add to the Columns of the GirdView, and the RowCommand event will work. Strange. The button column is fixed.
Insert method
System.Web.UI.WebControls.BoundField bf = System.Web.UI.WebControls.BoundField ();
bf.HeaderText = "Sales Header";
bf.DataField = "SalesTitle";
GirdView1.Columns.Insert (1, bf);
Add method
System.Web.UI.WebControls.BoundField bf = System.Web.UI.WebControls.BoundField ();
bf.HeaderText = "Sales Header";
bf.DataField = "SalesTitle";
GirdView1.Columns.add (bf); |
|