Remove rows from grid

2 posts, 0 answers
  1. Hodaya
    Hodaya avatar
    4 posts
    Member since:
    Nov 2017

    Posted 27 Nov Link to this post

    Hi. I am trying to remove rows and I get "formatException".

    I've try to remove the rows like that:

    grid.GridElement.BeginUpdate();

    foreach (GridViewDataRowInfo row in grid.Rows)
    {
          if (row.Cells[1].Value.ToString() == "False")
          {
                grid.Rows.Remove(row);
          }
    }

    grid.GridElement.EndUpdate();

    AND like that:

    grid.GridElement.BeginUpdate();

    IEnumerable<GridViewDataRowInfo> uncheckedRows = grid.Rows.Where<GridViewDataRowInfo>(row => row.Cells[1].Value.ToString() == "False");

    foreach (GridViewDataRowInfo uncheckedRow in uncheckedRows)
           grid.Rows.Remove(uncheckedRow);

    grid.GridElement.EndUpdate();

    BOTH WAYS DON'T  WORK... 

  2. Dess
    Admin
    Dess avatar
    2214 posts

    Posted 28 Nov Link to this post

    Hello, Hodaya,

    Thank you for writing.  

    Your question has already been answered in the other thread you have posted on the same topic. Please, see our answer there for more information.
    We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

    Thank you for your understanding.

    Regards,
    Dess
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top