这是我的网格视图前端
<asp:GridView ID="GridView1" runat="server"> //This is auto generated grid view..
<Columns>
<asp:TemplateField HeaderText="Remarks">
<ItemTemplate>
<asp:TextBox ID="remarks" runat="server" Text=""></asp:TextBox> //This is the text box
which i need to copy with some columns and save it in another table in sql server
and i need to put this column as last column but it is coming as first
</ItemTemplate>
</asp:TemplateField>
</Columns>
这是后端。我的主要疑问是如何从自动生成的网格中复制没有列号的列
try
{
con.Open();
GridView1.EmptyDataText = "No Records Found";
GridView1.DataSource = cmd.ExecuteReader();
GridView1.DataBind(); //how can i solve this? How to set the column in the last in auto generate columns
}
catch (Exception ex)
{
throw ex;
//Message
}
finally
{
con.Close();
con.Dispose();
}
}