如何将datagrideview列绑定到BindingSource列

问题描述:

我在我的应用程序中使用了datagrid,并且想将datagrid列绑定到bindingsource列,如果可以的话,该怎么办?
即我想要这样

i am using a datagrid in my application and want to bind the datagrid column to a bindingsource column is it posible if so how?
ie i want like this

perTestCtr.DataGrid.Columns["Perameter"].DataPropertyName  = bindingSourceParameter.(column Name of binding source) 


请帮我一个


Please help me some one

您不绑定DGV列,这意味着您可以将多个数据源用于1个DGV,并且这是不可能的.

您应该仅将DGVs数据源设置为bindingsource.如果您具有自动生成列,则将bindinsource列用作列标题,否则可以在定义列时在DGV中设置标题.
You don''t bind a DGV column, this implies that you could use multiple data sources for 1 DGV and that is not possible.

You should be simply setting the DGVs datasource to the bindingsource. If you have auto generate columns the the bindinsource columns are used for the column title otherwise you can set the caption in the DGV when you define the columns.