I have an event handler for when a value of a cell is changed. The event handler sets the value of another cell in the same record, but the new value is not displayed until the update method is called.
I don't want to 'update' the row as it is typically the row for adding a new record. I don't want to add the new record until after other columns are completed.
Neither of these work for me:
dr.Cells["Rate"].Value = amount; dr.SetCellValue(dr.FieldLayout.Fields["Rate"], amount);
This sounds a little tricky. Could you provide a snippet of code to help me reproduce the issue. I might be able to help you solve this one better that way.
Thanks,
I have the following method used to initialize the Rate column when the selected item changes. I don't want to call the CommitChangesToActiveRecord command because it adds the new row to the grid before the user can edit the other values of the new row.
void ItemChanged(object sender, SelectionChangedEventArgs args) { ComboBox cb = sender as ComboBox; if(cb.SelectedItem != null) { string s = cb.SelectedItem as string; Item item = Item.getItem(s); DataRecord dr = xamDataGrid1.ActiveRecord as DataRecord; RegistryEntry re = dr.DataItem as RegistryEntry; re.Rate = item.Amount; //dr.Cells["Rate"].Value = item.Amount; //dr.SetCellValue(dr.FieldLayout.Fields["Rate"],item.Amount);