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

RadWindow.ResponseButton and DataBinding

2 Answers 96 Views
Window
This is a migrated thread and some comments may be shown as answers.
Carsten Jendro
Top achievements
Rank 2
Carsten Jendro asked on 01 Jan 2011, 11:22 PM
Hi,

I Added a Bug report to the Issue-tracker some Hours ago.

My Problem was that i used RadWindow.ResponseButton and DataBinding together.

When i for typed text in a TextBox inside a RadWindow and then pressed
enter without changing the Focus, my Model is not updated when the Click
event of the button is invoked.


The update is done when the Click event is already completed.

For Myself i have found a Solution, but i think that other users
may have the same problem and can take part of my solution.

I made a small change in the RadWindow.InvokeButton method in the
Telerik Sourcecodes

i Added this just before the "button.Focus()" line to force to
update the Bindings of the currently Focussed Control.

FrameworkElement fe = FocusManager.GetFocusedElement() as FrameworkElement;
if (fe != null)
{
    foreach (var dependencyProperty in fe.GetDependencyProperties())
    {
        BindingExpression be = fe.GetBindingExpression(dependencyProperty);
        if (be != null)
        {
            be.UpdateSource();
        }
    }
}

I Hope it helps someone here.  


Greets,

Carsten

2 Answers, 1 is accepted

Sort by
0
Carsten Jendro
Top achievements
Rank 2
answered on 03 Jan 2011, 03:52 PM
If there was a fix without compilling recompiling RadControls, please tell me
0
George
Telerik team
answered on 06 Jan 2011, 10:03 AM
Hello,

 
Thank you for your feedback. We will investigate the cause for this issue and we will fix it in one of our future releases. You can track this progress in our Public Issue Tracking System (PITS) with Issue ID = 4505


All the best,
George
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
Tags
Window
Asked by
Carsten Jendro
Top achievements
Rank 2
Answers by
Carsten Jendro
Top achievements
Rank 2
George
Telerik team
Share this question
or