TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Bahubali Gane
NA
48
1.4k
how to build for loop for my code
Apr 7 2016 12:36 AM
guys plz help me, i dont know how to build a for loop for my code
following is my code
dataGridView1.Rows.Add();
dataGridView1.Rows[0].Cells[0].Value = dt.Rows[0][0].ToString();
dataGridView1.Rows[0].Cells[1].Value = dt.Rows[0][1].ToString();
dataGridView1.Rows[0].Cells[2].Value = dt.Rows[0][2].ToString();
dataGridView1.Rows[0].Cells[3].Value = dt.Rows[0][3].ToString();
dataGridView1.Rows[0].Cells[4].Value = dt.Rows[0][4].ToString();
dataGridView1.Rows[0].Cells[5].Value = dt.Rows[1][4].ToString();
dataGridView1.Rows[0].Cells[6].Value = dt.Rows[2][4].ToString();
dataGridView1.Rows[0].Cells[7].Value = dt.Rows[3][4].ToString();
dataGridView1.Rows[0].Cells[8].Value = dt.Rows[0][5].ToString();
dataGridView1.Rows[0].Cells[9].Value = dt.Rows[0][6].ToString();
above code is for one data row, i have more than 1000 rows. i think it is possible through only for loop, please anybody help me, thank u in advance
Reply
Answers (
9
)
how to compare two date range From & To for validation
problem while running for loop.