In Datascource deltede rows visible in flexgrid

Posted by: lars.seehaus on 3 December 2021, 9:09 am EST

    • Post Options:
    • Link

    Posted 3 December 2021, 9:09 am EST

    I have a flexgrid with a Datatable. As some of the rows in the Datatable cannot be deleted and must be marked I delete the row over a contextemenu command. and delete the row directly in the Datattable, if it is allowed.

    When i Filter the flexgrid and delete a first batch of rows and after this a second batch. only the first batch disappears in the flexgrid. the second ist visibel but not in the datatable annymore.

    I have created a test programm where this problem can be recreated. show error.zip

  • Posted 3 December 2021, 9:20 am EST

    Sorry I have realised that I use the german word for delete

  • Posted 6 December 2021, 6:45 am EST

    Hi,

    In your sample, you can call the DataTable.AcceptChanges method before and after deleting from the DataTable to commit the deletion in the DataTable. This will reflect the changes in the grid as well.

    JFYI, A better approach would be to delete the rows directly from the grid by using the C1FlexGrid.Rows.Remove method and then calling the DataTable.AcceptChanges. This will also update the DataTable accordingly.

    Please let us know if you need any other information.

    Regards,

    Avnish

    show error mod.zip

  • Posted 7 December 2021, 9:25 am EST

    Hi

    Thanks for the answer

    I have testet it with remove before but have forgotten to sort the list of the indexs in desc order.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels