I don't know why this ...
-
Hi ! very Excuse ! consider this : First Record--> firstname :Joe , lastname :Meech (in asp.net)i wrote this code for save and add : For Add :
txtName.Text=String.Empty; txtFname.Text=String.Empty;
and For Save :DataRow dr=dt.NewRow(); dr["firstname"]=txtName.Text; dr["lastname"]=txtFname.Text; dt.Rows.Add(dr); da.Update(dt); dt.AcceptChanges(); int RowTablePosition=0; RowTablePosition =dt.Rows.Count-1;
My difficult is : if Page.DataBind() , and if want to add a new Record , and then Save this Record --> the First Record is added to the end of the table , No this New Record !! But if Page or Text is not bind , this new Record is Saved ! i couldn't this solve yet!!:confused: Please , Guide me . very thanks for any help ! mostafa hosseiny b. -
Hi ! very Excuse ! consider this : First Record--> firstname :Joe , lastname :Meech (in asp.net)i wrote this code for save and add : For Add :
txtName.Text=String.Empty; txtFname.Text=String.Empty;
and For Save :DataRow dr=dt.NewRow(); dr["firstname"]=txtName.Text; dr["lastname"]=txtFname.Text; dt.Rows.Add(dr); da.Update(dt); dt.AcceptChanges(); int RowTablePosition=0; RowTablePosition =dt.Rows.Count-1;
My difficult is : if Page.DataBind() , and if want to add a new Record , and then Save this Record --> the First Record is added to the end of the table , No this New Record !! But if Page or Text is not bind , this new Record is Saved ! i couldn't this solve yet!!:confused: Please , Guide me . very thanks for any help ! mostafa hosseiny b. -
txtName.Text=String.Empty; txtFname.Text=String.Empty; DataRow dr=dt.NewRow(); dr["firstname"]=txtName.Text; dr["lastname"]=txtFname.Text; dt.Rows.InsertAt(dr, 0) dt.DataBind() Hope this will help you get some new idea :) -C-?-M-