开发者

Best way to edit data from a listview, in WPF?

i am pretty new to .net, i am retrievi开发者_开发百科ng data and displaying it in a listview using an ObservableCollection in WPF. I am wondering what the best way would be to add an edit option for each row and display maybe a pop up text box to edit data?

I dont want to use a datasource as i am connecting to a db use SQLDataReader.

Any help is appreciated. Thanks!


You can use DataGrid instead of listview, which allow you to edit in place, or you can use dialog, pass selected item to dialog, bind UIElements to item properties, and binding will automatically change the item in ObservableCollection, which you than can save to DB.

you can find in place edit sample here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜