1. Add a column of the data source to an existing irdview column.
For example, add all file names in the folder to the file name column of irdview, as shown in the following figure:
First, set the datapropertyname of the file name column to the name of the data column to be displayed in the datagridview.
Here I am bound to folder. Name, so simply enter name in datapropertyname.
Directoryinfo folder = new directoryinfo (txtpath. Text); dgvfilelist. autogeneratecolumns = false; dgvfilelist. datasource = folder. getfiles ("*. xls ");
2. assign values to a column of a row
Dgvfilelist. Rows [I]. cells ["cbresult"]. value = "wait ";
3. Check whether the checkbox of irdview is selected.
For (INT I = 0; I <datagridview1.rows. count; I ++) {If (bool) datagridview1.rows [I]. cell [0]. editedformattedvalue = true) {// todo }}
Datagirdview Common Operations