we have a Grid that has been working like a charm with pre 126.96.36.199 versions of the grid.
Now with the latest version we experience one issue: When a ComboBox cell becomes the selected/active cell, the cell will no longer render the current selection, ie the cell is empty. As soon as the cell looses the focus, it will display the text again.
Unfortunately I haven''t been able to reproduce this using a small sample and our app is way too big to send it as an attachment.
What might be causing this behavior?
Any help/hint would be highly appreciated
ADAdministrator Syncfusion Team February 2, 2005 05:57 AM
With the 3.x version we made some changes how ControlText and ControlValue properties are handled because with earlier version it was not strong typed enough. Comboboxes and other cell types often assigned different types other than specified with CellValueType.
It could be that these changes break existing behavoir although we tried to make it as compatible as possible with earlier versions and tested various use cases. However, there should be no problem with existing cell types.
Some questions to narrow down the problem:
What events did you override? Is this combobox a derived cell type or built-in combobox? Exactly what settings are you using? Do you set textbox text directly / what methods did you override if it is a derived cell type?
Does it make any difference if you set style.StrictValueType = false?
KIKai IskeFebruary 2, 2005 08:47 AM
thanks for the feedback. The "problem" occurs with a standard ComboBox and with a custom cell type, but I guess if I can "fix" it for the standard ComboBox it''ll work for the custom type as well.
We handle the following events:
I thought it might have anything to do with PrepareViewStyleInfo so I commented out the complete code, to no luck.
The other event handlers do not alter the cell value by any means.
I do not set the text directly, I fully rely on the ComboBox handling this for me based on DataSource and CellValue settings.
Unfortunately I am unable to debug into Syncfusion.Windows.Grid.dll as noted in my Direct-Trac post. Otherwise I might have been able to supply further information.
One hint though: In my custom cell type I see that the Model.GetFormattedText() method gets called with a DBNull value resulting in an empty string, of course.
ADAdministrator Syncfusion Team February 2, 2005 08:55 AM
When GetFormattedText returns DbNull that usually happens when the text could not be converted to the CellValueType in the cell or when the underlying cell value could not be converted to the display text.
Are any exceptions thrown?
I also fixed a InvalidCastException just recently in GridCellValueConvert. Maybe that is related to your problem.
KIKai IskeFebruary 2, 2005 11:45 PM
I found out that it has to do with the improved strong type handling.
I have now made sure that the CellValueType actually corresponds to the type stored in CellValue (which in case of my MultiSelect CellType is an IList type). I have also made sure that the CellValueType is set to int for the comboboxes that failed to render properly.
Thanks for your help/insights