We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

looping records

hi, I have a combo containing val1, val2 and val3 strings. When the user changes these values, I go and set col1 on the grid to the corresponding selected item.For example, if val1 is selected, for all records col1 is set to val1.So, foreach(Record rec in this.grid.Table.Records) { rec.SetValue("col1", val1); } This takes a lot of time when I click the combobox for the first time.From the second time it takes less time.It takes about 17 sec for the first time and teh second time less than 2 secs. Why is this variation in time? regards, catinat

3 Replies

AD Administrator Syncfusion Team September 8, 2005 11:36 AM UTC

If you set TableDirty = true, you probably will not see the difference between teh first and second pass. But, you can greatly improve performnace by updating teh datasource directly. Here is a little sample. http://www.syncfusion.com/Support/user/uploads/GGC_SetRec_33b148e3.zip


CV Catinat Velmourougan September 8, 2005 11:59 AM UTC

hi, Thanks working superfast. But im just concerned about this tabledirty = true; as whether it will affect some other part of the code. What exactly it causes? regards, catinat


AD Administrator Syncfusion Team September 8, 2005 04:16 PM UTC

It tells the grid that it does not have to respond to individual changes from outside the grid. It will remain in this state until something tries to access the grid for any reason.

Loader.
Live Chat Icon For mobile
Up arrow icon