View previous topic :: View next topic |
Author |
Message |
keesp Guest
|
Posted: Thu Oct 06, 2005 2:21 pm Post subject: ObjectCellBinding.setValue problem |
|
|
Hi,
When I am editing values (using a universal editbox) in a virtual tree, I often get the situation where the data is not taken over. This occurs after I get the following error info from the setValue(0 method of the object cell binding class:
VirtualTree: An error occurred when setting the value of [] in [].
Key cannot be null.
Parameter name: key
Can anyone tell me exactly when this message is spawned?
Thanks
Kees |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Thu Oct 06, 2005 10:40 pm Post subject: |
|
|
The CellBinding.SetValue method has a try/catch block to catch any exceptions raised by the client code when attempting to set the object value - so probably there is an exception occuring in your code which is then being trapped and reported. Make sure that you have your Visual Studio Debug->Exceptions settings are set to catch exceptions when they are thrown (all the indicators should be red). In my opinion this should be the default setting but isn't.
Are you binding to an object or a DataTable/View? _________________ Infralution Support |
|
Back to top |
|
|
keesp Guest
|
Posted: Thu Oct 13, 2005 8:22 am Post subject: solution for this problem |
|
|
For completeness, the answer to this problem (after some checking with support and their valuable feedback).
I used to override the cellBinding from ObjectCellBinding. However, in the SetValue method I set the correct values programmatically, an action which is normally also done in the base.SetValue through reflection. So in this case, it is not useful to call the base.SetValue method, and there is no real need to derive from ObjectCellBinding, but CellBinding instead. |
|
Back to top |
|
|
|