3 Answers, 1 is accepted
0
Hello Rafael,
Thank you for contacting us.
In the general case the RadAutoCompleteBox should be defined in the same class as its TokenValidating event handler, which means that you can access it directly. Also you can use the view element parent which is the default RadAutoCompleteBoxElement that is used by the control and most of its properties can be accessed through it:
Detailed information about our controls structure can be found in the following help section: Overview.
I hope this information helps. Should you have any other questions, I will be glad to assist you.
Regards,
Dimitar
Telerik
Thank you for contacting us.
In the general case the RadAutoCompleteBox should be defined in the same class as its TokenValidating event handler, which means that you can access it directly. Also you can use the view element parent which is the default RadAutoCompleteBoxElement that is used by the control and most of its properties can be accessed through it:
void radAutoCompleteBox1_TokenValidating(object sender, Telerik.WinControls.UI.TokenValidatingEventArgs e)
{
AutoCompleteBoxViewElement viewElement = sender as AutoCompleteBoxViewElement;
RadAutoCompleteBoxElement element = viewElement.Parent as RadAutoCompleteBoxElement;
radAutoCompleteBox1.AccessibleDescription = "Description";
}
Detailed information about our controls structure can be found in the following help section: Overview.
I hope this information helps. Should you have any other questions, I will be glad to assist you.
Regards,
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0
Rafael
Top achievements
Rank 1
answered on 11 Apr 2014, 10:48 AM
On this way, I can not use the same sub to handle 2 differents ACB only cheking SENDER ?
I need to change the text property of both of them when each one gets a new valid token.
I need to change the text property of both of them when each one gets a new valid token.
0
Hello Rafael,
Thank you for writing back.
In this case you can use the Text property of the element, which references the same property of the control:
This way you will be able to use this handler with more than one auto complete box.
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Thank you for writing back.
In this case you can use the Text property of the element, which references the same property of the control:
void
radAutoCompleteBox1_TokenValidating(
object
sender, Telerik.WinControls.UI.TokenValidatingEventArgs e)
{
AutoCompleteBoxViewElement viewElement = sender
as
AutoCompleteBoxViewElement;
RadAutoCompleteBoxElement element = viewElement.Parent
as
RadAutoCompleteBoxElement;
element.Text =
"Test"
;
}
This way you will be able to use this handler with more than one auto complete box.
I hope this helps. Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.