WPF grid sample

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 
A

Andrus

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.
 
N

Nicholas Paldino [.NET/C# MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top