vyclarks
vyclarks

Reputation: 878

How to add Devexpress GridView Command Column in the last of Gridview

After I load data into Dev Gridview, I add a Delete Button:

public void loadgrid()
{
         ....
         gv.DataBind();
         GridViewCommandColumn d = new GridViewCommandColumn();
         d.DeleteButton.Text = Delete;
        d.DeleteButton.Visible = true;
        d.Caption = " ";
        gv.Columns.Add(d);
}

But the Column of Delete Button is not in the last of gridview (it is in the left of lastdata column).

I really dont know why, I just think when I added, the command column is auto added in the last. Am I wrong???

help!!!

Upvotes: 0

Views: 2627

Answers (1)

Marguth
Marguth

Reputation: 191

Just Set the VisibleIndex Property to the highes amount.

Source

Upvotes: 1

Related Questions