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
Farrukh Javeid
NA
38
0
Index was out of range: DataGridView
Aug 18 2010 7:53 AM
Hi folks,
I am trying to insert the data into DataGridView and I am having this exception
"Index was out of range. Must be non-negative and less than the size of the collection."!
The code is
dgv_SearchResult.Rows[0].Cells[0].Value = (Object)myProfile.UserName.ToString();
dgv_SearchResult.Rows[0].Cells[1].Value = (Object)myProfile.Description.ToString();
dgv_SearchResult.Rows[0].Cells[2].Value = (Object)myProfile.Statistics.SubscriberCount.ToString();
dgv_SearchResult.Rows[0].Cells[3].Value = (Object)myProfile.Statistics.ViewCount.ToString();
Any idea why the exception is occuring?
Reply
Answers (
2
)
Storing and accessing .dll file in resources
Checksum of .aspx/.ascx