Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello!

                                    I'm not managing to insert new rows in the gridview. I believe that lack some setting I do not know.
                                    Please, someone could introduce me how to add new rows on the gridview using only the gridview itself?


                                    Thanks!!

                                You must  log in  or  register  to leave comments

                                1 Solution

                                1

                                To add a new row, you can call the View.AddNewRow method.

                                If your task is to insert a row in a specific position, you need to use methods of your datasource. To have generic code that works with any datasource, just cast this datasource to the IList interface and call its Insert method.

                                Please let us know whether or not you find this solution helpful.

                                • Miro Baptista 05.06.2013

                                  I'm trying to use this way http://documentation.devexpress.com/#WindowsForms/CustomDocument778
                                  But the values that I'm typing ​​to include the record doesn't remain in the columns. So, are not being inserted.
                                  See the picture attached.

                                • If the value does not remain in the field after moving to another row/cell, it typically means that the FieldName property for the GridColumn is not correct. The FieldName property is case-sensitive and must exactly match the name of a field/property in your data source.

                                • Andrew Ser (DevExpress Support) 05.06.2013

                                  Hello,
                                  As far as I understand, you are using the NewItemRow to add new rows. I am afraid the information you provided is insufficient to determine the cause of this issue. The problem is likely caused by your datasource specifics. I have tried to replicate this behavior in a sample project, but haven't succeeded. Attached is a project that illustrates my attempts. Please try to modify this project so that it illustrates the problematic behavior and send it to us.
                                  I look forward to hearing from you.

                                • Miro Baptista 05.06.2013

                                  Brendon,

                                  Really, there was an error in the information column. Thank you!

                                  Andrew,

                                  I'm found a method that was diverting operation and not permit the loading of the datasource.

                                  So now it's everything ok!!!
                                  I have read the documentation suggested and helped me a lot too.

                                  Thanks!!!

                                You must  log in  or  register  to leave comments

                                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