开发者

How to add rows and columns to a DataGrid?

开发者 https://www.devze.com 2023-01-26 21:45 出处:网络
how is it possible to add rows and columns to a DataGrid? I am trying to write two functions like: public void addRow(DataGrid grid);

how is it possible to add rows and columns to a DataGrid?

I am trying to write two functions like:

public void addRow(DataGrid grid);
public void addColumn(DataGrid grid);

U开发者_JAVA百科nfortunately the DataGrid itself doesn't have those functions by default.

Thanks a lot.


I haven't done lots with DataGrid's lately, but for as far I know, a DataGrid has a datasource, and it's the datasource that should be extended within the code.

After extending the datasource (like a datatable), you should refresh the datagrid.


This link provides information about how to add rows to datagrid


It doesn't have thos functions by default? What about:

dataGrid.Columns.Add
0

精彩评论

暂无评论...
验证码 换一张
取 消