Home Forums WinForms controls Xceed Grid for WinForms Custom UserControl for cellEditorManager raising exception "Object must implement IConvertible"

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #17507 |

    I have created a control that is derived from Xceed.Grid.GridControl, which is being used to display a hybrid bound/unbound set of data rows.

    The datasource is a LINQ query which has an ID, Description and EntitySet<> with zero to many records from a child table.

    I manually create columns for all possible values (I guess like a pivot table) and have implemented a custom Cell and overridden GetValue() and SetValue() to work on the values from the column that has the data…

    I have used a custom CellEditorManager to handle the editing of the value, and I have successfully set it up so that when the user edits the cell, a custom control appears (inPlace = false) and the control is populated with the value (if it had one) or a new one is created if it was null.

    If I exit the editor (TAB, or select another row somewhere), data was not being saved. I have tracked it down to an exception being thrown somewhere in the Validation of the cell, with the message that the “Object must implement IConvertible”.

    I am not sure which object is supposed to implement IConvertible, or why it should need to.

    I am using version 3.9 of the Grid for .Net.

    Regards

    Craig

    Imported from legacy forums. Posted by Craig (had 1134 views)

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Craig,

    Nothing (besides grouping and sorting) should require an IConvertible implementation. It is hard to say at the moment what required IConvertible. If you activate to break on all exception, do you see the call stack? That could be of some help. Otherwise, a small test project that reproduces the issue could also help us investigate further.

     

    Imported from legacy forums. Posted by Diane [Xceed] (had 262 views)

    User (Old forums)
    Member
    Post count: 23064

    Have just sent sample code to support@xceed.com.

    I hope that you can let me know what I am doing wrong….

    Craig

    Imported from legacy forums. Posted by Craig (had 1472 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.