This is a migrated thread and some comments may be shown as answers.

Remove rows from grid

1 Answer 469 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hodaya
Top achievements
Rank 1
Hodaya asked on 27 Nov 2017, 10:39 AM

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... 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Nov 2017, 11:52 AM
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.
Tags
GridView
Asked by
Hodaya
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or