Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Answers
Foreach loop in datagrid
Ankit Shukla
7y
278
1
Reply
Hello, I need to select n-1 rows from datagrid and my code is:
foreach (DataGridViewRow row in dataGridView1.Rows)
{
foreach (DataGridViewCell cell in row.Cells)
{
pdfTable.AddCell(cell.Value.ToString());
}
}
from where I should change to select all rows except last row..
Thanks in Advance.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to code to introduce a switch in HOMEGENIE in C# program
Convert string to GUID and GUID to old string. vise versa