Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello Devexpress team,


                                    There is one issue with Gridcontrol while binding with sql database.


                                    In Detail :

                                    I am using textEdit in celltemplate of GridColumn , and created one style for textEdit where IsReadOnly and Background properties are defined.


                                    Problem:

                                    While using simple list as ItemsSource of GridControl all those properties defined in style is working,

                                    But with sql table binding Someproperties in style are not working. Eg: IsReadOnly.


                                    In sample provided :

                                    I used two different GridContols bonded to List<sting> and sql table respectively.

                                    One style for TextEdit in window.Resources.


                                    sample project is attached with this post for your reference. please find the same.


                                    Thanks and regards,

                                    Antony

                                RnD20062012.zip
                                • Antony Joseph A V 06.21.2012

                                  Hello....
                                         Please reply to me. Its urgent. I didn't got any mail regarding review or any thing related to this post

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hi Antony,

                                Thank you for your patience. I have reproduced the problem you described. This behavior seems like a bug in our controls. We will fix it ASAP.

                                As a temporary workaround, I suggest you set the GridColumn.IsReadOnly property to True:

                                	
                                [XML]
                                <dxg:GridColumn FieldName="EmployeeID" ReadOnly="True"> ... </dxg:GridColumn>

                                Updated
                                The cause of this behavior is that the IsReadOnly properties for editors are set at the column level. To resolve this issue, I suggest you set the ColumnBase.EditTemplate.

                                For instance:

                                	
                                [XML]
                                <dxg:GridColumn.EditTemplate> <ControlTemplate> <ControlTemplate.Resources> <Style TargetType="dxe:TextEdit"> <Setter Property="IsReadOnly" Value="True"/> </Style> </ControlTemplate.Resources> <dxe:TextEdit x:Name="PART_Editor" EditValue="{Binding EditValue, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" EditMode="InplaceActive" /> </ControlTemplate> </dxg:GridColumn.EditTemplate>

                                Note that this problem is not related to the SQL datasource. I have modified your sample to demonstrate this.

                                Please take a moment to review the sample project and let me know if you need further assistance.

                                Thanks

                                • Antony Joseph A V 06.21.2012

                                  Hello Ivan,
                                  Thank you for your reply.
                                  setting ReadOnly on GridColumn can be good solution, But my requirement is somewhat different , I want to handle each and every Editors individually.

                                  Like setting a datatrigger in style and checking value entered on Editor, Then setting property

                                  I am attaching modified sample along with this comment. Please find the same.

                                  Modification is on TextEdit style

                                  please reply to it ASAP.

                                  Thanks
                                  Antony

                                • Hi Antony,

                                  I have updated my first answer to demonstrate a workaround. Please take a moment to review it.

                                You must  log in  or  register  to leave comments
                                You must  log in  or  register  to leave an answer

                                Is your intention to post an answer to your own question?

                                • If so, then proceed.
                                • If you simply wanted to post additional information, ask for further clarification, or to just say "Thanks!", please click Leave a Comment.
                                • If you wish to edit your original question, please use the Edit button in the Toolbox at the top right corner of that entry.

                                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.

                                Your Privacy - Legal Statements

                                Copyright © 1998-2013 Developer Express Inc.
                                ALL RIGHTS RESERVED
                                All trademarks or registered trademarks
                                are property of their respective owners