Reputation: 43
I am totally new to programming in c# and have no previous experience with Object Oriented programming. I am teaching myself, so please I have many questions. I created a simple array
that takes information from (STEP Text file) and displays it in a TextBox
, now I am trying to put this information in Grid
(like table) instead of showing them in a TextBox
. I found Grid
and Datagrid
in the Toolbox
window, but couldn't find DataGridView
. I am using Visual Studio 2015
. I would like to know:
DataGridView
to my project?grid
? Since I am a beginner, please, be patient with me.
Upvotes: 0
Views: 359
Reputation: 4505
The reason is DataGridView
is Windows Forms
control and is available in Windows Forms
project type only. You wont be able to use that in your WPF
project. The equivalent in WPF
is DataGrid
.
As for the part regarding adding information in a grid, you will have to set the DataContext
property of the DataGrid
. For learning WPF
, I would recommend to check out the two websites below:
https://wpftutorial.net/DataGrid.html
http://www.blackwasp.co.uk/WPFDataGrid.aspx
Upvotes: 2