Ticket T416319
Visible to All Users

XtraGridControl - How to add a new row

created 9 years ago

[DevExpress Support Team: CLONED FROM Q524021: Adding new row to gridview]
 plz make this code in c#

Comments (3)
DevExpress Support Team 9 years ago

    Hello,

    The Adding new row to gridview thread describes how to add a new row to GridView at the data source level. I mean that it is a common task to add a new data item to your data source. Would you please clarify your final goal? This information will allow us to find a suitable solution quickly.
    I look forward to your reply.

      Hi,
      I think, it's much more better to give the option property setting by Dev product directly, so that we can do it without any coding. It's very common. Your solution at https://www.devexpress.com/Support/Center/Question/Details/Q524021/gridview-how-to-add-a-new-row-to-a-specific-position, it's using ADO.NET's functionality to do that. If user doesn't use ADO.NET with your product, they also have to do something mannually. Why Dev cannot encapsulate it  in internal?

      DevExpress Support Team 6 years ago

        Hello Anders,

        The solution from the GridView - How to add a new row to a specific position ticket illustrates how to add a row at the data source level because the task is to add a row to the topmost position. If your task is to simply add a row to the grid, feel free to use the GridView.AddNewRow method. If it is necessary that the newly added row is shown at the top of the grid, consider using an additional sort field and then sort by that column or add a record at the data source level as suggested in the above-mentioned ticket. Drop me a line if you have additional questions.

        Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

        Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.