Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Editable WPF GridView Row

Tags:

c#

wpf

gridview

I am trying to create a databound WPF GridView whose rows can either be read-only or editable (by double-clicking or through a context menu). I would like for the row to return to a read-only state if any of its editable controls loses focus. The functionality I am looking for is very similar to this example but with an entire row being editted simultaneously (rather than a single cell). Does anyone know how to implement this?

like image 941
Joseph Sturtevant Avatar asked Dec 27 '25 14:12

Joseph Sturtevant


2 Answers

there is also the "official" wpf datagrid from microsoft at codeplex : http://www.codeplex.com/wpf

like image 55
Joachim Kerschbaumer Avatar answered Dec 30 '25 04:12

Joachim Kerschbaumer


With the ListView + GridView control il quite complex because this control "thinks in column" so you have to create a template for every column and switch the read-only template with edit template (for every cell). I suggest you to take a look a the xceed DataGrid. It's free and it implements the edit functionality in a simpler way (you can find info here: http://xceed.com/Grid_WPF_Intro.html)

like image 36
ema Avatar answered Dec 30 '25 04:12

ema



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!