Home All Groups Group Topic Archive Search About
Author
17 Aug 2006 8:29 AM
Taoge
Hi, all

I tried to change the content in a cell when user click a button. the code
as following:

    protected void Button1_Click(object sender, EventArgs e)
    {
        this.GridView1.SelectedIndex = 12;
        this.GridView1.EditIndex = this.GridView1.SelectedIndex;
        Label1.Text = this.GridView1.SelectedRow.Cells[0].Text;
        this.GridView1.SelectedRow.Cells[2].Text="10";
    }

Everything is OK except the content in Cells[2] does not change, and when I
click the button again, it changes this time and the cell becomes
unalterable.

How can I accept the change and keep the cell alterable.

thanks!