How to Delete Multiple Selected Rows from C1TrueDBGrid?

Posted by: kevin on 4 October 2017, 1:55 pm EST

    • Post Options:
    • Link

    Posted 4 October 2017, 1:55 pm EST

    Hello,

    I have a C1trueDBGrid which bounded to the sql database table.

    I would like to delete the selected rows but not success.

    The codes are below. would you please help me?

    for (int r = 0; r < c1TrueDBGrid1.SelectedRows.Count; r++)

    {

    c1TrueDBGrid1.Bookmark = c1TrueDBGrid1.SelectedRows[r];

    c1TrueDBGrid1.Delete();

    }

    Thanks,

    Yanna

  • Posted 5 October 2017, 4:37 am EST

    Hi!

    Kindly try the following code:

    for(int counter = c1TrueDBGrid1.SelectedRows.Count - 1; counter >= 0; counter--)
    {
                    c1TrueDBGrid1.Row = c1TrueDBGrid1.SelectedRows[counter];
                    c1TrueDBGrid1.Delete();
    }
    c1TrueDBGrid1.SelectedRows.Clear();
    
    
    • Meenakshi
Need extra support?

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

Learn More

Forum Channels