we got a scenario where we would like to use a AutoCompleteBox within a CellEditTemplate of a GridViewDataColumn.
Generally the combination works a expected; the only problem we're facing is some sort of a 'display issue':
The DisplayMember of the SelectedItem is not displayed in the RadAutoCompleteBox when the corresponding RadGridViewCell
is focused in edit mode (see attached picture).
Here's the corresponding part of our XAML:
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Adress,Converter={StaticResource AdressToStringConverter}}"
Header
=
"Adress"
UniqueName
=
"Adress"
TabStopMode
=
"StopInEditMode"
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
Grid
Margin
=
"4"
MinWidth
=
"100"
>
<
Grid.ColumnDefinitions
>
<
ColumnDefinition
/>
<
ColumnDefinition
/>
</
Grid.ColumnDefinitions
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
telerik:RadAutoCompleteBox
Grid.Row
=
"0"
Grid.Column
=
"1"
ItemsSource
=
"{Binding Source={StaticResource myViewModel}, Path=SelectAdress}"
DisplayMemberPath
=
"AdressName"
SelectedItem
=
"{Binding Adress, Mode=TwoWay}"
SelectionMode
=
"Single"
TextSearchMode
=
"Contains"
WatermarkContent
=
"Select Adress"
/>
</
Grid
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
Are we missing something obvious here or could this be an issue of the AutoCompleteBox?
Thanks in advance.
Kind regards,
Chris
19 Answers, 1 is accepted
Generally the SelectedItem should be a type, as the bound data objects. I am not sure how is your data structured? Would you please provide some code snippets or any other relevant information?
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Hello Didie,
thanks for your reply and the sample project.
Our data structure is similar to the one in the sample and using the same code for the RadAutoCompleteBox
"outside" of RadGridView works as expected - so the data structure should not be the cause of the effect.
Your project shows exactly the same issue i tried to describe in my initial post:
Upon editing the corresponding cell i would expect to see the Name of the Club in the RadAutoCompleteBox
but instead of that the RadAutoCompleteBox is empty (please see attached picture for clarification).
For testing purposes I've replaced the RadAutoCompleteBox with the AutoCompleteBox of the Silverlight Toolkit
and this works according to my above mentioned expectation.
Judging on this i'd suspect this to be a bug / missing feature in the RadAutoCompleteBox (please correct me if I'm wrong ;-) )
Btw, I've created a support ticket (634997) for this topic just before you posted your reply, there's also a sample project attached
which i can't upload here because of the size. In the ticked I've also described a second presumable related issue.
All the best,
Chris
Thank you for the project you sent to us in the support ticket.
We have considered this as a bug and we are currently working on resolving it. The fix should be available for the LIB scheduled for the 10th December.
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
thanks for your reply.
So we'll wait for the LIB.
All the best,
Chris
I am facing the similar issue. I just want to know whether the issue was resolved.
The issue originally reported was fixed. I am not sure what is the similar issue you have, do you reproduce it with the latest binaries?
If so, then would it be possible for you to send us a simple demo showing the case you have met?
Didie
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I've tried this into a sample project with binaries from the latest internal release and it worked as expected. You can find my project attached and a video demonstrating how it works at our side. It would be great if you modify our project so it reproduces the issue and send it back to us.
Regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Is using a DisplayMemberPath a problem?
Also when we use the control in the grid view as the CellEditTemplate we have a strange issue. Once the user clicks the control and starts typing, the first character entered seems to be interpreted wrong. Instead of the character a space shows up. Every consecutive character is entered fine and once the control had focus every consecutive restarted text input works fine as well. But the very first time the control is used we get this issue. Any idea what causes this?
So we basically continue to have two issues:
- In CellEditTemplate entering the control deletes the displayed text (DisplayMemberPath for complex object in use)
- Entering the control and starting to type ignores the first entered character and replaces it with a space.
The issue is kind of pressing for us since we're trying to implement a new control behavior here and this is blocking our use case. Thank you in advance.
I just tried this on the sample project I previously attached in this thread and everything worked fine. Both issues you described are not reproducible at our side. I used the latest official release - Q1 2013 . It would be great if you open a new support ticket and send us a sample project reproducing this issue so we will be able to investigate it further.
All the best,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
We have enabled trial support in your account, you can send us a ticket from the following link:
http://www.telerik.com/account/support-tickets/available-support-list.aspx
Regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I don't see any support threads started from you or Andreas. It would be great if you check again whether the support ticket was opened and send us the support thread id.
Regards,
Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I've just upgraded to version 2013.2.724, and now I've got the same problem too.
The first character I type is replaced with a "2", the AutoCompleteBox is unusable...
Deborah
As previously mentioned we are not able to reproduce the issue with our latest released version of RadAutoCompleteBox. Could you take a look at our SDK example that demonstrates how to use the control inside RadGridView. The example could be found here, and you can download the entire repository as a zip file from here.
If you could reproduce the issue in that sample project and send it to us in a new support thread it would be of great help in being able to observe the issue on our side and see what could be the cause of it.
Regards,
Vladi
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
my AutoCompleteBox is not inside a gridview.
Here's the code:
<
StackPanel
HorizontalAlignment
=
"Left"
Name
=
"stackPanSearch"
Orientation
=
"Horizontal"
VerticalAlignment
=
"Top"
Grid.Row
=
"0"
Grid.ColumnSpan
=
"2"
>
<
TextBlock
Text
=
"Supplier: "
VerticalAlignment
=
"Center"
></
TextBlock
>
<
telerik:RadAutoCompleteBox
x:Name
=
"boxSupplier"
Width
=
"300"
TextSearchMode
=
"Contains"
SelectionMode
=
"Single"
DisplayMemberPath
=
"Name"
Margin
=
"0,0,15,0"
/>
<
Button
x:Name
=
"btnSearch"
Content
=
"Search"
Height
=
"25"
Click
=
"btnSearch_Click"
/>
</
StackPanel
>
Thanks,
Deborah
We were not able to reproduce the exact scenario from the provided code snippet because there where some missing parts like the binding to the RadAutoCompleteBox controls ItemsSource collection and the btnSearch Click event.
It seems that you are using the RadAutoCompleteBox with its default AutoCompleteMode which is SuggestAppend. In that mode when a match is found the text in the control is automatically appended to the matched items text. For example if there is an "Item 1" entry in the collection and you type "1" the text will automatically by appended to "Item 1" rather then stay the typed "1". If you want to turn off that functionality you could set the AutoCompleteMode to Suggest, which would cause the control to only display the matched items in it's the drop down.
Regards,
Vladi
Telerik
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>