This is a migrated thread and some comments may be shown as answers.

Error in NumericUpDown and TabControl

2 Answers 59 Views
NumericUpDown
This is a migrated thread and some comments may be shown as answers.
Daní
Top achievements
Rank 1
Daní asked on 20 Apr 2012, 09:07 AM
Hi,

I'm facing an error when using RadNumericUpDown and RadTabControl.

I have a TabContol with a few TabItems. On each TabItem I have placed some NumericUpDown controls. Changing selected tab item causes a fatal error whenever a RadNumericUpDown has the focus. The error is a fatal one, "trying to read write protected memory". Via intellitrace, I've been able to confirm that the error is produced on the OnLostFocus method. The TabItem change forces a LostFocus, on this event, RadNumeriUpDown tries to update the inner TextBox and I suspect that, due the tab change, is already disconnected from visual tree.

2 Answers, 1 is accepted

Sort by
0
Boyan
Telerik team
answered on 25 Apr 2012, 09:24 AM
Hi Dani,

I tried with a simple project RadTabControl with some TabItems and in all of them 2-3 RadNumericUpdowns but I was not able to reproduce the bad behavior. Is something specific that you are doing?

It will be best if you could send us a simple project or a code snippet. This will greatly help us reproduce the error.

Regards,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Daní
Top achievements
Rank 1
answered on 25 Apr 2012, 10:19 AM
Hello Boyan,

tanks for your interest. It's a strange issue. Finally I could solve it. It seems its related to DataBinding on Styles. I created some default custom styles for some controls in my view. It's a bit complicated to explain but it was useful to me to define DataBindings on the style to reuse it and save some coding. I was doing exactly the same in Silverligt 4 but with a custom "Style Data Binding" implementation as silverlight didn't support binding on style setters until version 5. After upgrade to Slv 5, I decided to use the internal Style DataBinding system as I suposed it would be more efficente and elegant. But it started to appear this error, and not only with RadNumericUpDown control, often, after several content switches, suddenly I got cast exception on bindings that was running previously.
Undoing this change and returning back to my old custom style data binding implementatio solved all these errors.

Tags
NumericUpDown
Asked by
Daní
Top achievements
Rank 1
Answers by
Boyan
Telerik team
Daní
Top achievements
Rank 1
Share this question
or