J
JB
I'm dynamically creating a Gridview object and filling it with
contents from an ArrayList as follows:
GridView2.AutoGenerateColumns = true;
GridView2.DataSource = ArrayListObject;
GridView2.DataBind();
This works nicely, but i need to add a button field row onto it, as
well as possibly a textbox and image field later.
If I add it into the page source like this:
<asp:GridView ID="GridView2" runat="server">
<Columns>
<asp:ButtonField ButtonType = "Button" Text="Remove"
CommandName="remove" />
</Columns>
</asp:GridView>
It works, but it displays the button as the first column, and i need
it as the last column.
Seems like a simple thing to do but its causing me grief.
Can't seem to find a way to add a specific column in codebehind..
Any ideas?
contents from an ArrayList as follows:
GridView2.AutoGenerateColumns = true;
GridView2.DataSource = ArrayListObject;
GridView2.DataBind();
This works nicely, but i need to add a button field row onto it, as
well as possibly a textbox and image field later.
If I add it into the page source like this:
<asp:GridView ID="GridView2" runat="server">
<Columns>
<asp:ButtonField ButtonType = "Button" Text="Remove"
CommandName="remove" />
</Columns>
</asp:GridView>
It works, but it displays the button as the first column, and i need
it as the last column.
Seems like a simple thing to do but its causing me grief.
Can't seem to find a way to add a specific column in codebehind..
Any ideas?