Jean-Marc Flamand dit le_beluet

First problem is

Our current Application in development is crashing when loading the very large data ( Approx 114,373 Records) in to the already attached DataGridViewComboBoxColumn .

Please suggest me the possible solution.

Second Problem is

I did Create the DataGridViewComboBoxColumn combobox , load the very larger data and attached to the data gridview . Now click on the DataGridViewComboBoxColumn in the Datagridview for drop down item selection , It is taking a lot of time to display the Dropdown items (15 minutes "it's not a joke") .

Please Suggest me the solution possible solution.




Re: Windows Forms Data Controls and Databinding DataGridViewComboBox taking more time to display Dropdown items

Rong-Chun Zhang - MSFT

Hi Jean-Marc Flamand dit le_beluet,

114,373 Records is a large number of items for a combobox. It will take a long time to load these records and it is not a friendly User Interface. My suggestion is, if possible, you should try to filter these records before you add them to the combobox¡¯s item collection.

Hope this helps.
Best regards.
Rong-Chun Zhang






Re: Windows Forms Data Controls and Databinding DataGridViewComboBox taking more time to display Dropdown items

Jean-Marc Flamand dit le_beluet

Here some clarification of the current problem.

When the datagridwiew is loaded and I select the datagridviewcombobox it take time to display the dropdown items.

When I select another Item or select another datagridviewrow and re-select the datagridviewcombobox on this row it take time to display the dropdown items.

As solution I'm lookink to create a thread. In this way the data is loaded faster but still have the same problem as above.

Remark:

Agreed it is not a "friendly User Interface" when you have problem but it does work well with microsoft access (even version97). Why there is a big difference btwn a nomal combobox and datagridviewcombobox

When I do the same functionality on microsoft access ( with a front end access form and back end data) it's a lot faster with the same amount of data.

Questions:

Can you elaborate more on "filter these record"






Re: Windows Forms Data Controls and Databinding DataGridViewComboBox taking more time to display Dropdown items

Rong-Chun Zhang - MSFT

Hi Jean-Marc Flamand dit le_beluet,

As far as I know, the combo box hosted in a ComboBoxCell will not be initialized until the ComboBoxCell is in edit mode. When you navigate from one cell into the ComboBoxCell, it will cause the ComboBox hosted in the cell to load such a large number of items (114,373), and this process will take a long time. But a normal ComboBox only load these items once.

To filter these records means to show a part of these 114,373 Records. You can use either a where clause in SQL statement to defines the condition to be met for the rows to be returned or the RowFilter provided by the DataView to set the expression used to filter which rows are viewed in the DataView. Check this page for a sample.

Hope this helps.
Best regards.
Rong-Chun Zhang