Hello.
I have a Ui with a RadBusyIndicator and a few TextBox's. The UI works in this way, the user input a ZIP Code in a specific textbox, when the user clicks in the "search" button, i call a WCF service that returns the Address of the ZIP Code. Untill the service call doesn't returns I set the IsBusy of the RadBusyIndicator to True so the user know that something is loading.
My problem is, after the service returns with the data, I need to validate each everyone of the TextBoxes and if anyone is with no value I need to setfocus on it, but with the RadBusyIndicator it doesn't work.
I searched in the documentation and the forum and i found some people with the same issue but i think the XAML approach discribed here:
http://www.telerik.com/help/silverlight/radbusyindicator-how-to-restore-the-focus.html
Doesn't fit in my case because i don't know what textbox need to receive the focus.
This is the Method that is fired after the service call returns, and here i need to set the focus.
Is there another workaround for this?
Thanks!
I have a Ui with a RadBusyIndicator and a few TextBox's. The UI works in this way, the user input a ZIP Code in a specific textbox, when the user clicks in the "search" button, i call a WCF service that returns the Address of the ZIP Code. Untill the service call doesn't returns I set the IsBusy of the RadBusyIndicator to True so the user know that something is loading.
My problem is, after the service returns with the data, I need to validate each everyone of the TextBoxes and if anyone is with no value I need to setfocus on it, but with the RadBusyIndicator it doesn't work.
I searched in the documentation and the forum and i found some people with the same issue but i think the XAML approach discribed here:
http://www.telerik.com/help/silverlight/radbusyindicator-how-to-restore-the-focus.html
Doesn't fit in my case because i don't know what textbox need to receive the focus.
This is the Method that is fired after the service call returns, and here i need to set the focus.
private
void
PreencherEnderecoCompleto()
{
if
(
this
.ViewModel.CEPEncontrado)
{
this
.ViewModel.CombosVisibility = Visibility.Collapsed;
this
.ViewModel.TextBoxVisibility = Visibility.Visible;
if
(
this
.txtBairro.Text ==
""
)
{
this
.txtBairro.Focus();
}
else
if
(
this
.txtEndereco.Text ==
""
)
{
this
.txtEndereco.Focus();
}
else
if
(
this
.txtNumero.Text ==
""
)
{
this
.txtNumero.Focus();
}
}
}
Is there another workaround for this?
Thanks!