This is a migrated thread and some comments may be shown as answers.
Error GridComboBoxCellElement when click on horizontal scrollbar
4 Answers 39 Views
This is a migrated thread and some comments may be shown as answers.
rakotondrabe
Top achievements
Rank 1
rakotondrabe asked on 16 Jan 2013, 08:47 AM
Hi,

I have a gridview with several columns and a horizontal scrollbar.

When I select an element of a combobox and when I click the right of the horizontal scrollbar so that it moves alone towards the right and to view the other columns, I have this error : 

Source : System.Threading.Thread
Message : Object reference not set to an instance of an object.
at Telerik.WinControls.UI.GridComboBoxCellElement.SetContent()
   at Telerik.WinControls.UI.GridDataCellElement.set_Value(Object value)
   at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
   at Telerik.WinControls.UI.GridViewEditManager.CloseEditor()
   at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDown(MouseEventArgs e)
   at Telerik.WinControls.UI.RadGridView.OnMouseDown(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

My winform application is then completely frozen.

And this error appears only with combobox columns.

Can you help me to solve this error?

Thank you!

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Jan 2013, 02:30 PM
Hello Rakotondrabe,

Thank you for writing.

I have tested the described scenario with our latest version and I was not able to replicate it. Attached you can find the project I used for my tests. 

Could you please let modify it on a way to replicate the experienced exception and let me know how can I reproduce it, so I can investigate it and provide you with adequate support.

Greetings,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
0
Mark
Top achievements
Rank 1
answered on 13 Mar 2013, 04:10 PM
Hi,

I am also getting this exception on one particular dropdown. We have numerous combobox dropdowns and all are fine except one and I am unable to see what is different.

The dropdown is populated with the domain values as a datatable and the column bound to the relevant column on the grid datasource. The selected value in this dropdown is then set when the datasource is bound to the grid and correctly displays the selected value. The dropdown correctly displays the list of available values and I can select different values.

If I then select a different value and click off the grid though I get the exact exception above.

If the value is null initially though I can select a value and click off the grid and everything is OK, However, if I then repeat the operation now there is an existing value, I get the exception.

Regardless of whether the value is populated initially or not, if I select a value and tab out of the cell instead of clicking off, I get no exception and everything works as expected.

As I say, I am unable to determine what is different with this combobox than the 100's of others we have across the application.

Any help gratefully received!

Thanks,

0
Mark
Top achievements
Rank 1
answered on 14 Mar 2013, 01:21 PM
Hi,

I think this is caused by a grid refresh occurring on the Cell Value Changed event.

I have removed the refresh (moved it) and this is no longer crashing.

Many thanks,
0
Stefan
Telerik team
answered on 18 Mar 2013, 09:11 AM
Hi Mark,

I am glad to hear that you have resolved this case. Let us know if you have any other questions.
 

Kind regards,
Stefan
the Telerik team
WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Asked by
rakotondrabe
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mark
Top achievements
Rank 1
Share this question
or