Your problem is right here  

              private void Page_Load(object sender, System.EventArgs e)
               {
                       sqlDataAdapter1.Fill(dsCustomer1);
                       dgCustomer.DataBind();
               }

Page_load gets called every time you post back, and it gets called
before your event handler gets called.  So in this case your grid gets
reloaded from the database every time you hit update.

Change your code to...

              private void Page_Load(object sender, System.EventArgs e)
               {
                       if(!Page.IsPostBack)
                       {
                           sqlDataAdapter1.Fill(dsCustomer1);
                           dgCustomer.DataBind();
                       }
               }




-- 
Dean Fiala
Very Practical Software, Inc
http://www.vpsw.com


------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hdjeikp/M=362131.6882499.7825260.1510227/D=groups/S=1705006764:TM/Y=YAHOO/EXP=1124309170/A=2889191/R=0/SIG=10r90krvo/*http://www.thebeehive.org
">Get Bzzzy! (real tools to help you find a job) Welcome to the Sweet Life 
- brought to you by One Economy</a>.</font>
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to