Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello, I'm sending you an example of 3 textedits. I try to set max length and the visibility of scrollbars, but both do not work.
                                    Please tell me what's wrong with this.

                                    Thanks
                                    Michalis

                                DevSL.zip
                                0

                                Hi Michalis,

                                Thank you for providing a sample project!

                                Please note that the MaxLength property restricts the total number of characters that can be entered into an editor regardless of whether the text wrap feature is enabled or not. To enable the text wrapping, you'll need to restrict the editor's width by specifying its Width and(or) MaxWidth properties.

                                To display a vertical scrollbar, besides setting VerticalScrollBarVisibility, you'll need to adjust the VerticalContentAlignment property and set it to "Top".

                                I've modified your sample project to illustrate these approaches in action. Please review it and let me know if you need any further assistance.

                                Thanks,
                                Dmitry

                                Q355524.DevSL.Modified.zip
                                0

                                Hi Dmitry
                                Thanks for your reply. You were really hepfull.

                                I want to report a bug which I saw. When you paste data in textedit and have maxlength equals to 200 the text edit accepts more than 200 characters.

                                0

                                Hi Michalis,

                                You are welcome! I'm glad to hear it.

                                As for the pasting problem, I want to thank you for your attention and say that we are aware of this problem and this bug has already been fixed: ID Q347776, 'TextEdit.MaxLength property does not work for paste operations'.

                                You will not encounter this problem in our new 11.1.9 and 11.2 releases.

                                Thanks,
                                Dmitry

                                0

                                Hello Dmitry

                                I try to do the same thing for a cell in GridControl like this:

                                <dxg:GridColumn Header="Description" FieldName="Description">
                                                        <dxg:GridColumn.DisplayTemplate>
                                                            <ControlTemplate>
                                                                <dxe:TextEdit Name="txt_DescriptionLocalGrid" TextWrapping="Wrap" MaxLength="200" Text="{Binding Path=DataContext.RowData.Row.Description, Mode=TwoWay}"/>
                                                            </ControlTemplate>
                                                        </dxg:GridColumn.DisplayTemplate>
                                                    </dxg:GridColumn>

                                but it does not work.

                                Thanks

                                0

                                Hi Michalis,

                                Thank you for your update. It is difficult to clearly diagnose this problem without being able to reproduce it locally. Could you please provide us with a sample illustrating your issue?

                                At the moment, I suggest you to set the editor's Name to 'PART_Editor' since it is a required condition of the proper cell template and bind its EditValue property as follows:

                                	
                                [XAML]
                                <dxg:GridColumn.DisplayTemplate> <ControlTemplate> <dxe:TextEdit Name="PART_Editor" EditMode="InplaceInactive" TextWrapping="Wrap" EditValue="{Binding Path=EditValue, RelativeSource={RelativeSource TemplatedParent}}"/> </ControlTemplate> </dxg:GridColumn.DisplayTemplate>

                                In this way, the Display template works as expected on my side. If you need to get text wrapping both in display and edit mode you need to override the column's CellTemplate instead:

                                	
                                [XAML]
                                <dxg:GridColumn.CellTemplate> <DataTemplate> <dxe:TextEdit Name="PART_Editor" TextWrapping="Wrap" MaxLength="5"/> </DataTemplate> </dxg:GridColumn.CellTemplate>

                                Note, that no binding specifications are required. The cell value will be displayed within the editor automatically once its name is properly adjusted.

                                Please refer to the attachment to see this approach in action.

                                Thanks,
                                Dmitry

                                Q355524.SLGrid.zip
                                0

                                Hello Dimitry

                                I examined your example and it works properly but in my project which I connect data via entity framework does not work.

                                If I use only the
                                <dxg:GridColumn.CellTemplate>
                                    <DataTemplate>
                                        <dxe:TextEdit Name="PART_Editor" TextWrapping="Wrap" MaxLength="5"/>
                                    </DataTemplate>
                                </dxg:GridColumn.CellTemplate>
                                I can' see data in grid. I have to use the DisplayTemplate as well to see them.

                                Thank you

                                Michalis

                                0

                                Hi Michalis,

                                I am afraid the information you provided is insufficient to diagnose the problem. To do this, we need to reproduce the issue locally. Would you please provide us with the full grid column declaration (both working and failed variants), DXGrid ItemsSource specification, and your entity class? It will also be great if you could provide us with a sample project that illustrates your issue in action.

                                I'm looking forward to your feedback.

                                Thanks,
                                Dmitry

                                0

                                Hi Dmitry

                                Here is my sample.

                                Thanks

                                Michalis

                                DevSL.rar
                                0

                                Hi Michalis,

                                Thank you for providing a sample project. It seems that the issue is caused by the wrong TextEdit's Name specification within the cell template in your application. You set it to 'txt_ProductName', while it should be specified as 'PART_Editor'. This is a required condition for the CellTemplate implementation since DXGrid searches for the 'PART_Editor' name within the template to find a cell editor and manage its focus and data binding.

                                Please try this solution and let me know of your results.

                                Thanks,
                                Dmitry

                                0

                                Thanks

                                0

                                You are welcome.

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners