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
140
WinGrid's DropDown cell loose text on mouseclick
posted

I have one wingrid bound to a BindingSource. The data are correctly shown in the grid at runtime.

One of the columns of the grid is a varchar key that need to be decoded in a lookup table. So, I have a second BindingSource containing a couple key+description from this table. The BindingSource can be bound to a dropdown or a combo (I tried both) and the control is used as an editor for the grid's column (the description is the displaymember, the key is the valuemember). All is ok and I can change the values using the dropdown combo.

A problem raise when I navigate the records of the grid using the mouse instead of the keybord: randomly, the cell containing the drop down show a null string instead of the correct value when I change the current row clicking with thw mouse on a different row. It happens this way:

  • I am on a row and the text shown in the dropdown column is correct
  • I change the current row clicking with the mouse on another row
  • The row that have lost focus now have the text disappeared in the dropdown column (why?)
  • I return to the previous row using only the keyboard and the text appear (is it only a wrong refresh problem?)

I tried different databases (mysq via odbc, access via oledb), different dropdown infragistics controls and binding methods (valuelist and editcontrol), but the bug is always there.

Is there a solution? 

  • 45049
    posted

    This behavior doesn't sound familiar to me, nor does the behavior sound correct at first glance.

    It wouldn't matter what kind of database you use in this case.  WinGrid is a presentation-layer control, not a data-access-layer tool.  Whatever means you use to get the data into your Windows Forms program doesn't matter.  WinGrid binds the same to a DataSet or custom business collection (likely viewed through a BindingSource) the same way whether the data came from OLE, ODBC, SQL Server, or added programmatically.

    Please remember that these forums area a peer-to-peer resource to share issues and ideas with other Infragistics users.  If you require official support from Infragistics, particularly to report a possible bug, please submit a support incident to Infragistics Developer Support from this page of our website.

    The best thing that you can provide to help is a sample project demonstrating the behavior.  We'll need to be able to run and debug it.  Since the database access shouldn't matter, I suggest that you populate your data programmatically.  If this isn't possible, please use the Northwind database from either Access or SQL Server.