Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
912
performance when setting datasource on grid
posted

 I have a table in a dataset with 6100 records.  Customer complained of really bad performance.  Timer testing revealed that it took 48 seconds to do the:

MyGrid.datasource = ds.tables("MyTable").defaultview

I tried a number of variations... having the defaultview sorted, not sorted, sorted same a the prim key, turning off syncwithcurrencymanager all to no avail.   I'm at my wits end trying to figure out why this is taking so very long mostly because I don't know what the setting of the datasource for a grid actually does.  Any ideas about what I should be looking for? 

Thanks, Ron 

Parents
  • 469350
    Verified Answer
    Offline posted

     Hi Ron,

        It's hard to say what might be causing this without a lot more information. I can tell you that 6100 rows is not a lot and the grid should be able to handle that pretty easily. My guess is that something in your code is slowing it down.Which events of the grid are you hooking? I would pay particular attention to events like InitializeRow and InitializeLayout and make sure your code is as efficient as possible. 

        You might also want to try turning on Exception handling to see if any exceptions are being raised and caught. This is a common cause of performance issues.

        Another thing to check is ValueLists. If you are using any in the grid, try removing them (as a test) to see if that helps. 

Reply Children