?
Solved

populate DataGridView column with int array

Posted on 2006-04-05
2
Medium Priority
?
711 Views
Last Modified: 2012-05-05
Hi experts,
How can i copy int array as a new column into dataGridView already binding to database?
0
Comment
Question by:skydancer11
2 Comments
 
LVL 6

Accepted Solution

by:
e1v earned 2000 total points
ID: 16379823
Here is an example:

            boundDataGridView.Columns.Add("IntColumn", "IntColumn");
            int[] intArray = { 1, 2, 3, 4, 5, 6, 7 };
           
            foreach (DataGridViewRow row in boundDataGridView.Rows)
            {
                if (row.Index >= intArray.Length) break;
                row.Cells["IntColumn"].Value = intArray[row.Index];
            }            
0
 

Author Comment

by:skydancer11
ID: 16381600
Thank's e1v
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
If you are looking for an automated solution for backup single or multiple Office 365 user mailboxes to Outlook data file, then you can use Kernel Office 365 Backup & Restore tool. Go through the video to check out the steps to backup single or mult…
Watch the video to learn how one can deal with PST file corruption issue with an outstanding Kernel for Outlook PST Repair Tool easily. Using this tool, non-technical users can swiftly perform the repair process to restore their essential data witho…
Suggested Courses
Course of the Month4 days, 5 hours left to enroll

599 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question