3 Answers, 1 is accepted
0
Hi Adam,
Thank you for contacting us.
In the most basic scenario where the RadAutoCompleteBox control's ItemsSource is simply bound to a collection in your ViewModel the user entered input could be taken from the SearchText property of the control. This property represents the currently visible text in the control. Have in mind that when the control is used in its default "Multiple" SelectionMode, if an filtered item is selected from its drop down the SearchText will be reset to a string.Empty value. And when the control is in its "Single" SelectionMode the SearchText is updated to the full text of the selected item.
Hope this information is helpful. If we have missed something please let us know.
Regards,
Vladi
Telerik
Thank you for contacting us.
In the most basic scenario where the RadAutoCompleteBox control's ItemsSource is simply bound to a collection in your ViewModel the user entered input could be taken from the SearchText property of the control. This property represents the currently visible text in the control. Have in mind that when the control is used in its default "Multiple" SelectionMode, if an filtered item is selected from its drop down the SearchText will be reset to a string.Empty value. And when the control is in its "Single" SelectionMode the SearchText is updated to the full text of the selected item.
Hope this information is helpful. If we have missed something please let us know.
Regards,
Vladi
Telerik
See What's Next in App Development. Register for TelerikNEXT.
0
Adam
Top achievements
Rank 1
answered on 27 Apr 2015, 02:14 PM
Hi Vladi,
Thanks for the info. I'm not looking for the text the user entered into input. I am trying to view the SQL query that is generated by the control by combining the SqlDataSource SelectCommand with the SearchText and with the other options such as MaxResultCount and Filter.
I tried to view this by trapping the control state using OnDataSourceSelect event, however, it appears that if this event is used, it assumes that the developer wants to implement custom server-side filtering of the data. I want instead to view the queries that are generated with the out-of-the-box configuration.
Thanks,
Adam.
0
Hi Adam,
We are not sure we understand the whole scenario from your project and the related questions. By design the RadAutoCompleteBox control requires its ItemsSource to be populated before is filtering mechanism is triggered. The filtering of the control is handled by its FilteringBehavior. Could you describe to us the setup in your project:
If you could try to isolate the issue in a sample project and send it to us in a new support thread it would be very helpful in fully understanding the scenario in order to further investigate it.
Regards,
Vladi
Telerik
We are not sure we understand the whole scenario from your project and the related questions. By design the RadAutoCompleteBox control requires its ItemsSource to be populated before is filtering mechanism is triggered. The filtering of the control is handled by its FilteringBehavior. Could you describe to us the setup in your project:
- How is the control's ItemsSource populated
- Where and how are you making connection from your DB to the RadAutoCompleteBox control
- In which SelectionMode is the control used
- Are there any specific bindings to the properties of the control etc.
If you could try to isolate the issue in a sample project and send it to us in a new support thread it would be very helpful in fully understanding the scenario in order to further investigate it.
Regards,
Vladi
Telerik
See What's Next in App Development. Register for TelerikNEXT.