I want to iterate through the rows created after I added them in the "click here to add a new row" and shows up at the bottom. How do I iterate through these new rows?
3 Answers, 1 is accepted
0
Dimitar
Telerik team
answered on 13 Oct 2015, 09:12 AM
Hello Chang,
Thank you for writing.
The following article shows how you can iterate the grid rows: Iterating Rows.
Let me know if you have additional questions.
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Hi, I understand that I can use an event right after the row in changed, but I was instructed that I will have to add them as a batch manually using a button. In this case since the add row data is added to the existing gridview rows, how can I tell the newly added row data apart from the data that already exists in the gridview? I would like to iterate through the rows and only select the rows that I typed in to add to the database, but not the existing data, is there a flag or mark I can use? Thanks for the reply!
foreach (GridViewRowInfo rowInfo in radGridView1.Rows)
{
if (rowInfo.Tag != null && rowInfo.Tag == "new")
{
Console.WriteLine(rowInfo.Tag);
}
}
}
I hope this will be useful.
Regards,
Dimitar
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items