girdeview问题帮助我的朋友

问题描述:

hai朋友们如何动态创建3 * 3网格视图并将其值分配给可编辑的单元格以及一些具有组合框的单元格
帮帮我的朋友

hai friends how to create 3*3 grideview dynamicaly and assign values to its cells the cells can be editable to and some cells have combobox to
help me friends

您可以使用二维数组尝试使用.
You can try it by using double dimension array.


请参见 ^ ]用于添加下拉菜单.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx[^] for adding a drop down.




首先使用一个GridView

并将列添加到该gridview.

有不同类型的列,如果要添加ComboBox,则要添加DataGrdiViewComboboxColumn.

完成添加三列的操作后.

添加任意数量的行.您可以使用.Rows(1).Cells(0).Value之类的方法访问I行和Coulumn J处的值.

同义词可能略有不同,但足以解决问题.
Hi,

First take one GridView

and Add columns to that gridview.

There are different types of columns available, if you want to add ComboBox then Add DataGrdiViewComboboxColumn.

Once you are done with adding three columns.

Add as many rows you want. You may access the value at row I and coulumn J using method like .Rows(1).Cells(0).Value.

Syntext may slightly differ, but enought to reach to the solusion.