开发者

.NET 3.5 DataGridView Control Display values

Having a problem with the dataGridView control being populated with Display members:

Code:

private string settingsFile = @"Data\IntelliSched.xml";
private void loadDataFromXML()
    {
        dataSetXML.ReadXml(settingsFile);
    }

DataSet conten开发者_如何学编程ts:

Table -> zone
id
name
----


Table -> postcode
name
code
zone
active
----

Pics:

alt text http://www.blazeware.net/examples/datagridview/runtime.PNG

The data is loaded, but it doesn't display the value/displaymember

For info here is the dataset config: alt text http://www.blazeware.net/examples/datagridview/columns.PNG alt text http://www.blazeware.net/examples/datagridview/dataSetColumns.PNG alt text http://www.blazeware.net/examples/datagridview/dataSetTables.PNG

Am I missing something??


I found the answer...

The Columns ColumnMapping type was set to Element. It needed to be Attribute...

Works now :)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜