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

text scrolled to the right by default, should be to the left

2 Answers 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kjell
Top achievements
Rank 1
Kjell asked on 23 Jul 2010, 05:50 PM
Kind of a nitpicky issue but when the text in a combo box is longer than the box itself, the end of the text is shown.  I am being asked to display the beginning of the text.

For example if the text is  "abcdef" and the combobox is wide enough to display only 3 characters, currently it will show "def", but we want it to show "abc".

I dont know if this matters but the combobox is in a gridview column. Here is the code for it:

 <telerik:GridViewDataColumn Header="Client" Width="160" SortMemberPath="ClientNum" DataMemberBinding="{Binding LearnClient}" TextAlignment="Left"
                                                 >
                        <telerik:GridViewDataColumn.CellStyle>
                            <Style TargetType="telerik:GridViewCell">
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="telerik:GridViewCell">
                                            <telerik:RadComboBox x:Name="radClientCombo" IsFilteringEnabled="True"   GotFocus="RadClientBox_GotFocus" Height="20" VerticalAlignment="Top"
                                                                 CanKeyboardNavigationSelectItems="True" Text="{Binding LearnClient}" IsEditable="True" />
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </telerik:GridViewDataColumn.CellStyle>
                    </telerik:GridViewDataColumn>

2 Answers, 1 is accepted

Sort by
0
Valeri Hristov
Telerik team
answered on 26 Jul 2010, 09:12 AM
Hello Kjell,

The text is scrolled to the right because when you focus RadComboBox it selects all of its text. To prevent the selection you could set the SelectAllTextEvent property to None:

<telerik:RadComboBox SelectAllTextEvent="None" ... />

Regards,
Valeri Hristov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Kjell
Top achievements
Rank 1
answered on 26 Jul 2010, 09:31 AM
yup that worked, thanks!
Tags
ComboBox
Asked by
Kjell
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Kjell
Top achievements
Rank 1
Share this question
or