locked
Update and Delete multiple records. RRS feed

  • Question

  • Hello,

    I am using editable grid.

    Can i update multiple records at a time?

    Can i delete multiple records at a time?

     

    when i try to delete multiple records at a time its deleteing only the last record that i selected for deletion.

    Even the same issue with updates?how can i pass list of properties to domain service(insert methos)?

     

    Thanks

     

     


    Wednesday, June 1, 2011 8:48 PM

Answers

  • Yes,

    I just double checked,It's working..........

    • Marked as answer by LVPrao Wednesday, June 1, 2011 10:24 PM
    Wednesday, June 1, 2011 10:23 PM

All replies

  • You can't shift-select multiple and delete. But you can delete multiple records and save once for all deletes for single trip. Updates same way. Updates are part of same changeset that is passed after this.Save().
    Wednesday, June 1, 2011 9:55 PM
  • Yes,

    I just double checked,It's working..........

    • Marked as answer by LVPrao Wednesday, June 1, 2011 10:24 PM
    Wednesday, June 1, 2011 10:23 PM
  • You may be able to add a checkbox column to the grid, let the user tick records to select them and then click a custom button that runs through all the records and deletes those where the checkbox is ticked.
    Simon Jones
    Wednesday, June 1, 2011 10:58 PM
  • Hi,

    How can I delete all records from a grid with a button ?


    -- Misi
    Wednesday, June 8, 2011 9:40 AM
  • Write code that runs through all the entities in the entityset and call the Delete method on each one.

    Then save the changes.


    Simon Jones
    Wednesday, June 8, 2011 9:50 AM
  • Could you give me an example ?

    For a selected record I have :

     mfne_modificas.SelectedItem.Delete();

    Is it something close to this : http://msdn.microsoft.com/en-us/vbasic/bb737928#del1tomany ?

    A query (var qry = from a in mfne_modificas select a;) , a foreach and a Remove(qry) ?


    -- Misi
    Wednesday, June 8, 2011 10:23 AM
  • Just a guess...
    For Each row AS mfne_modifica In mfne_modificas
      row.Delete
    Next
    

    Simon Jones
    Wednesday, June 8, 2011 10:30 AM
  • If I write this (I'm with C#) then all rows are marked for deletion

    foreach (mfne_modifica row in mfne_modificas)

        row.Delete();

    After that I have to refresh/submitchanges manually. How do I do this in C# ? 

     

     


    -- Misi
    Wednesday, June 8, 2011 2:17 PM
  • To save the data on the screen, call

    this.Save;
    

     


    Simon Jones
    Wednesday, June 8, 2011 2:22 PM