views:

222

answers:

1

Hello!

I have been looking around and even found a couple of related answers and didn't get a certain answer to my question.

Is there a way to have in the WPF ListView an additional row like in a DataGrid? I prefer using the ListView since I use 3.5 and the DataGrid is not officially in the box and has many quirks.
I would prefer using the ListView if there is an official option to add new rows or else I use the DataGrid.

Thanks a lot.

A: 

I would use the DataGrid. That functionality already exists so there's no need to reinvent the wheel... besides you can make the DataGrid function exactly the way the ListView does if you have the burning desire to do so. Usually in my apps, I use a DataGrid that is by default read-only, then I provide a button to the user to allow them to modify the contents of the DataGrid (set the read-only property to false). I also restyle the DataGrid because I think it looks ugly out of the box... especially on XP machines.

On a side note, last week I installed a fresh copy of VS 2008 SP1 on a new PC and it came with the WPF Toolkit already loaded (which includes the DataGrid, DatePicker, etc.). So you might want to check it out.

Brent
I know, I do use the ToolKit, but it's DataGrid has some bugs (from my past project experience) and its default style sux.Thanks anyway.
Shimmy