WPF grid sample

  • Thread starter Thread starter Andrus
  • Start date Start date
A

Andrus

In VCSE 2008 B2 I created WPF form, added grid an ran it.
Form does not show grid.

Where to find sample which allows to edit object collection returned by
Linq-SQL in WPF grid ?

Andrus.
 
Andrus,

Well, how did you add your items to the Grid?

The Grid class in WPF is not meant to be an editing grid, like the
DataGridView in Windows Forms. Rather, it is meant to provide layout only
for other components.
 
Nicholas,
Well, how did you add your items to the Grid?

No, I didnt add.
I expect that grid determines columns and rows from data source
automatically.
The Grid class in WPF is not meant to be an editing grid, like the
DataGridView in Windows Forms. Rather, it is meant to provide layout only
for other components.

where to find sample which shows how to edit data (collection returned by
Linq-SQL) in WPF grid ?

Andrus.
 
Andrus,

As I stated in my original reply, the Grid control is meant for layout
purposes, it's not meant to be an editing control. It doesn't even provide
any visible UI elements of it's own.

You have to do all the work yourself to control the editing of cells,
which is no small feat.

The fact that the data source is LINQ2SQL doesn't matter either. In the
end, you will have a list of items, and it's binding to that which you are
trying to do.

You might want to look into the free WPF Grid offered by XCeed:

http://xceed.com/Grid_WPF_Intro.html
 
Back
Top