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. Image for the cookie policy date
close icon

renderer doesn''t contain control value at CurrentCellCloseDropdown time

I have a combobox cell, bound to a datasource. I query the renderer to get the control value at CurrentCellCloseDropdown. Usually, this contains the current record of the datasource I''ve bound to the grid. However, sometimes if you select the dropdown twice (select something, then select something else), the renderer contains only the string value, and the control value is missing (ie I can''t get to the datasource record). Why would this happen, and how can I fix it.

2 Replies

AD Administrator Syncfusion Team February 6, 2005 08:02 PM UTC

Hi, in versions before 3.0 that sometimes happened that string values were assigned to the cell value in comboboxes (and also other cell types). In 3.0 we added logic in GridCellRendererBase to prevent this from happening and ensure proper type checking before values are assigned to Renderer.ControlValue. If you are not using the latest version is there a way you can upgrade to the latest version 3.0.1.0 or later? If you are using the latest version can you prepare a small sample that demonstrates the problem so we can reproduce it? Thanks, Stefan >I have a combobox cell, bound to a datasource. I query the renderer to get the control value at CurrentCellCloseDropdown. Usually, this contains the current record of the datasource I''ve bound to the grid. However, sometimes if you select the dropdown twice (select something, then select something else), the renderer contains only the string value, and the control value is missing (ie I can''t get to the datasource record). Why would this happen, and how can I fix it.


JE Jan Eugenides February 7, 2005 07:15 PM UTC

We are using 3.0.1.0. I decided that the problem is in the renderer.GetCellValue() call. If I don''t use that, and just grab the ControlValue directly from the renderer.ControlValue member, then I get the datasourc I''m expecting. I''m not sure why GetCellValue doesn''t always return the ControlValue *shrug*. Anyway, my code works now, so I''ll let you decide if there''s a bug in GetCellValue :)

Loader.
Live Chat Icon For mobile
Up arrow icon