Hi! I have a XamContextMenu in my XamDataGrid that's bound to a datasource. I want to be able to edit the underlying datarecord in the grid when clicking on the contextmenu. I have seen a bunch of forum posts on how to do that in Silverlight, but nothing so far in WPF. I'd really appreciate any assistance. Thanks!
Hi! Sorry I've been extremely busy and haven't gotten around to creating a sample yet. The error is still there using other visual elements suggested above.
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
Hi again,
I have been further looking into this issue for you however I wasn’t able to detect any misbehavior with the method whatsoever. Would it possible if you could provide me with a sample and some steps to reproduce, which can eventually give me some results. If the issue appears occasionally it should still be fixed.
Looking forward to hearing from you.
It is hard to isolate the behavior. Sometimes it works right away after filtering. Sometimes I filter and click on one row and it works, and click on another row and it doesn't work. Sometimes if I change the filter it and change it back it will start working again. I think I'm going to try GetClickedElements with one of the other classes you suggested in the mean time. Thanks!
Hello greenway,
I have been reading through yours and Krasimir’s correspondence so far and if the GetClickedElements does indeed fail at some point we would need to fix that. Can you please isolate when the behavior so we can try and find a solution?
Regarding the your question when you click on a cell you can also try using the method with the XamEditor (XamTextEditor, XamNumericEditor, XamDateTimeEditor, etc. depending on the data type that is in that column), the CellValuePresenter class, the DataRecordCellArea and the DataRecordPresenter class. You can also snoop your application in runtime in order to look through the visual tree and find something else that you can use.