0

Dear All

i want to load some data to grid view (which is not existing in the database currently)
and do some chages (putting tax rates etc) and caluculate totals and after all changes done
to update them on the database,

where can i keep those data temporaly ? and do the manupulation and then update datatbase finally
it seems i can't use row updating event on grid view(because i don't want to subit it to database untill
i update each and every row manualy)

what do you suggest ?

3
Contributors
3
Replies
13
Views
3 Years
Discussion Span
Last Post by Sumith Asanka
0

Always use a dataset to store data temporarily, which is fetched from any source. Datasets can hold data from database table in the same format.

0

Thanks for replies

i am using caching for this i have a problem with the following code

I can't retrive new values entered to datat grid only line no 2 gets the values others are not working, can any body give an idea why ?

if (Cache["DATASET"] != null)
            {

                DataSet ds = (DataSet)Cache["DATASET"];                
               1. ds.Tables["Comminv"].Rows[e.RowIndex]["price"] =Convert.ToDouble(e.NewValues["price"].ToString());

              2.  ds.Tables["Comminv"].Rows[e.RowIndex]["DiscountPer"] = 10;               
               3. string vatp = ((TextBox)DgridComminv.Rows[e.RowIndex].Cells[8].Controls[0]).Text.ToString();



                DgridComminv.DataBind();
                Cache.Insert("DATASET", ds, null, DateTime.Now.AddHours(24), System.Web.Caching.Cache.NoSlidingExpiration);

                DgridComminv.EditIndex = -1;
                GetGrndetailsfromCache();                

            }

thanks
regards
sumith

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.