datagrid and update command???
-
I have in my aspx application a small datagrid with column NAME: <%# DataBinder.Eval(Container, "DataItem.NAME") %> When I turn one of rows in datagrid in edit mode and change a NAME field I call updatecommand (ok), and it fires up an update event. In the code, I catch this event: private void dataGridVersija_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { Response.Write(((TextBox)e.Item.FindControl("txtNAME")).Text); this.dataGridVersija.EditItemIndex = -1; this.dataGridVersija.DataSource = this.DataView1; this.dataGridVersija.DataBind(); } I try to write the text that I changed, but all the time I get the old NAME (text). I cannot get these changes!! WHY? So how can I update datasource if I can not get changes I made? Thanx
-
I have in my aspx application a small datagrid with column NAME: <%# DataBinder.Eval(Container, "DataItem.NAME") %> When I turn one of rows in datagrid in edit mode and change a NAME field I call updatecommand (ok), and it fires up an update event. In the code, I catch this event: private void dataGridVersija_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e) { Response.Write(((TextBox)e.Item.FindControl("txtNAME")).Text); this.dataGridVersija.EditItemIndex = -1; this.dataGridVersija.DataSource = this.DataView1; this.dataGridVersija.DataBind(); } I try to write the text that I changed, but all the time I get the old NAME (text). I cannot get these changes!! WHY? So how can I update datasource if I can not get changes I made? Thanx