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.
Unfortunately, activation email could not send to your email. Please try again.

Cell text disappearing

Thread ID:

Created:

Updated:

Platform:

Replies:

24323 Feb 1,2005 08:12 AM Feb 2,2005 11:45 PM Windows Forms 4
loading
Tags: GridControl
Kai Iske
Asked On February 1, 2005 08:12 AM

Hi, we have a Grid that has been working like a charm with pre 3.0.1.0 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 Regards Kai Iske

Administrator [Syncfusion]
Replied On February 2, 2005 05:57 AM

Kai, 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? Stefan

Kai Iske
Replied On February 2, 2005 08:47 AM

Stefan, 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: CurrentCellChanging CurrentCellChanged PrepareViewStyleInfo KeyDown SizeChanged CurrentCellAcceptedChange 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. Regards Kai Iske

Administrator [Syncfusion]
Replied On 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. Stefan

Kai Iske
Replied On February 2, 2005 11:45 PM

Stefan, 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 Regards Kai

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;