this is the basic situation:
I have a datagrid. When I create a new Add Record, a new form is displayed over the grid which is databound to the ActiveRecord cells. If I edit the values in the form, the values are reflected in the grid but I don't think they are commited.. how can I do this?
Basically I want to replace the editing in the grid itself with editing the values of the form, but keeping the add/update/etc mechanics of the XamDataGrid.
Any hints on this? Thanks.
Yeah, more or less. But that will mean I can't use any of the adding/updating mechanisms of the datagrid.. since a data item is only created -after- you start editing.
I'm just a bit confused here.. I'm still kind of new to WPF, and things are still well.. a bit confusing ;-) but I'll probably figure something out. Thanks.
Interesting...
So, perhaps you should bind the popup editor to properties on the new data item, not the cells in the AddNew record. I don't know for sure, but my guess is that the grid depends on events from embedded editors to figure out when the new record should be committed to the data source. If you go ahead and directly "commit" the new data item to the data source, you won't have to rely on the grid to do it for you. Make sense?
Josh
well.. If I add a new record in the grid using the "Add Record" record, the record will only be committed to the datasource (just before RecordAdded event is raised I suppose) once I start editing in the editor within te grid. If I use an external form for this which I bind to the Cells of the DataGrid, this never happens when I start typing. Does this make more sense?
Hi Nico,
Nico said:If I edit the values in the form, the values are reflected in the grid but I don't think they are commited.. how can I do this?
What do you mean by "committed" and why do you think the values are not being committed?