开发者

Difference between datagrid and grid in wpf

What is 开发者_Python百科the difference between DataGrid (not GridView) and Grid controls in wpf?


A Grid is a control for laying out other controls on the form (or page).

A DataGrid is a control for displaying tabular data as read from a database for example.


You can think of the Grid as a combination of the Windows Forms background layout and a spreadsheet (in that you can have rows and columns) into which you can add controls and position them.

The Grid view is a View element that can be used in a ListView control to display data from database, XML or even CLR objects, in columns and rows with column headers and row indicators, similar to (but not exactly like) the DataGrid control in Windows Forms. GridView is only really usable as part of a ListView AFAIK.

So something like this:

<ListView>
    <ListView.View>
        <GridView/>
    </ListView.View>
</ListView>

Cory

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜