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

speed problem in Databinding to other control

In GridGroupingControl, I try to build a detail panel which will display a row value in controls such as TextBox,ComboBox according correspoding column type. When you click a grid row, this detail panel will display the row''s column values. I used DataBinding techs to bind control to the same table which was binded to the GridGroupingControl. This works fine, however the speed is so slow. When I click a row in the grid, it takes 10 seconds to refresh the control values in the detail panel. The code is like: // Code to create textbox control for each column // to detail panel called pnlDetail ...... // Code to load data from database to // DataSet _gdDataSet with a table // called "MyTable" ....... // setup GridGroupingControl datasource MyGrid.DataSource = _gdDataSet.Tables["MyTable"]; // setup detail control''s datasource DataTable tb=_gdDataSet.Tables["MyTable"]; foreach (Control ctl in pnlDetail.Controls) { // control''s tag holds table field name string sFieldName=ctl.Tag.ToString ctl.DataBindings.Clear(); ctl.DataBindings.Add("Text",tb,sFieldName); } Any idea?

4 Replies

AD Administrator Syncfusion Team November 16, 2004 08:06 AM

I tried to see this problem in this little sample, but could not. Are you seeing any exceptions listed in the output window? This would slow things down. GCC_TextBoxes_4167.zip


AD Administrator Syncfusion Team November 16, 2004 08:26 AM

I have looked your sample and compared my code. I found the difference is I have two columns have ComboBox which is bould to thier lookup table. These two columns have thier ComboBox controls in the detail panel binding to thier lookup table as well. this is caused the slow-down. When I deleted them from the detail panel controls( that is the detail panel have only textbox about 20), it works fast. Could you add a ComboBox column with lookup table in your code sample to see if it slow down? Thanks. >I tried to see this problem in this little sample, but could not. Are you seeing any exceptions listed in the output window? This would slow things down. > >GCC_TextBoxes_4167.zip > >


AD Administrator Syncfusion Team November 16, 2004 11:06 AM

Here is the sample back with a couple of comboboxes. It does not seem to have teh problem you described. Are you seeing any exceptions? GCC_TextBoxes_2853.zip


AD Administrator Syncfusion Team November 17, 2004 11:37 AM

Hello Clay, Thanks for help. You solved my problem. Now my code is working fast.. >Here is the sample back with a couple of comboboxes. It does not seem to have teh problem you described. Are you seeing any exceptions? > >GCC_TextBoxes_2853.zip > >

Loader.
Live Chat Icon For mobile
Up arrow icon