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

Text Wrapping During Text Entry

2 Answers 25 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 07 Apr 2011, 02:29 AM
Hello,

We have a grid with a column defined like this:

<

 

 

telerik:GridViewDataColumn Header="Comment Text" IsFilterable="False" IsGroupable="False" IsReadOnly="False" IsSortable="False" ShowDistinctFilters="False" UniqueName="Text" IsReorderable="False" Width="500" TextWrapping="Wrap" />

 


The TextWrapping attribute works fine when displaying text but NOT during text entry.

Can this be done so the user does not see the typical scrolling text effect during text entry?

Chris

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 07 Apr 2011, 02:27 PM
Hello Chris,

 

You may override this behavior by predefining the CellTemplate/CellEditTemplate of a GridViewDataColumn as shown below:

<telerik:GridViewDataColumn Header="Property1" DataMemberBinding="{Binding Property1}">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding Property1}" TextWrapping="Wrap"/>
                        </DataTemplate>
                        </telerik:GridViewDataColumn.CellTemplate>
                    <telerik:GridViewDataColumn.CellEditTemplate>
                        <DataTemplate>
                            <TextBox Text="{Binding Property1}" TextWrapping="Wrap"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellEditTemplate>
                </telerik:GridViewDataColumn>


Kind regards,
Vanya Pavlova
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
Chris
Top achievements
Rank 1
answered on 07 Apr 2011, 02:51 PM
Vanya,

This solves the wrappinmg issue nicely BUT the binding is now broken.
The entity class attribute is called "Text".

UniqueName

 

 

="Text"

 


This does seem to help:

DataMemberBinding

 

 

="{Binding Text}

 


Can you help us out?
Tags
GridView
Asked by
Chris
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Chris
Top achievements
Rank 1
Share this question
or