locked
Adding/Editing records in a datagrid RRS feed

  • Question

  • Can i add records and edit existing records in a datagrid???

    Or do i have to bust out the SQL? 

     

     

    Wednesday, April 28, 2010 5:59 PM

Answers

  • Hi Rj166,

     

    CF datagrid doesn’t provide the function for adding or editing records. The proper way is creating a new form,  wherein input new record or edit an existing record. Then we store the all data in a datatable, which also include previous data and bind the datagrid with the datatable again.

     

     

    Other way is creating a new control which override DataGrid control, we can add textcolumn and save column in it, like desktop DataGridView. Here is a sample:

    http://blogs.msdn.com/netcfteam/archive/2006/04/25/583542.aspx

     

    Best regards,
    Guang-Ming Bian - MSFT

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, May 3, 2010 9:22 AM