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

slower & slower on fill

Hi, I noticed that an sqladapter.Fill gets slower and slower on each call. Do you have any suggestion on how to stop this behavior? thanks this.dataSet81.customrates.Clear(); this.gridDataBoundGrid1.DataSource = null; this.gridDataBoundGrid1.DataSource = this.dataSet81.customrates; this.gridDataBoundGrid1.Model.Rows.RemoveRange(1, this.gridDataBoundGrid1.Model.RowCount - 1); this.sqlSelectCommand4.CommandText = this.origselect + " where chargecust=1 and wono =" + this.comboBoxBase1.Text + " order by seq"; try { this.sqlDataAdapter4.Fill(this.dataSet81); // <-- slower & slower } catch {} this.gridDataBoundGrid1.Model.ColWidths.ResizeToFit(GridRangeInfo.Rows(0, 20), GridResizeToFitOptions.IncludeHeaders);

6 Replies

AD Administrator Syncfusion Team September 9, 2005 03:30 PM UTC

You can try moving the fill between where you set DataSource = null and DataSource = this.dataSet81.customrates to see if that affects this. If you comment out the grid code, do you still see the behavior. You also might try just calling Fill on the DataTable and not the DataSet. Maybe calling DataTable.Reset woul daffect this as well.


AD Administrator Syncfusion Team September 9, 2005 04:22 PM UTC

Hi, I tried all those, still fill gets slower and slower. The Reset however doesn''t work at all, the grid stays empty. It reminds me of events being re-trapped over and over without any -= where they should be. where that happens i dunno, but must be in .net somewhere not syncfusion. this is a full sqladapter with update, insert, delete sql if that makes any difference. any other suggestions? i think you should be able to duplicate this problem easily enough. thanks


AD Administrator Syncfusion Team September 9, 2005 05:17 PM UTC

correction: i tried leaving the grid datasource as null now the speed isn''t affected, so maybe it is a syncfusion problem after all. thanks


AD Administrator Syncfusion Team September 14, 2005 06:24 PM UTC

Hi Clay, any luck with this?


AD Administrator Syncfusion Team September 14, 2005 06:46 PM UTC

What events are you subscribing to on the grid grid or DataTable. Such events may be affecting this behavior. I also supect that calling grid.Binder.SuspendBinding and grid.Binder.ResumeBinding may also take care of this problem.


AD Administrator Syncfusion Team September 14, 2005 08:23 PM UTC

yes, putting suspend/resume binding fixed it. thanks alot Clay!

Loader.
Live Chat Icon For mobile
Up arrow icon