Hi,
I am trying to raise cellupdated event for the same value e.g. if cell contains number 5 and if you edit cell and re enter value 5 its not raising the celll updated event. Can anyone please suggest why is it so and Can I raise the event. Thanks
Hello,
I have looked through your description and this is actually the designated behavior for the CellUpdated event. This event is fired specifically to ensure that the value in the cell is new and the DataSource has been or should be updated. The event that is fired on any change within the XamDataGrid is the CellChanged event.
Hope this helps. Please let me know if you can use any further clarification and if not please mark the thread as answered so it helps other users as well.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
Hi Pieter,
Thanks for your reply. The solution provided by you is not working for me as this event raise imidiately as u start updating cell and it does not has the new complete cell value. Can you please suggest some thing else for the senario thanks.
I can also suggest you use the EditModeEnding and EditModeEnded events.
Please let me know if they better suit your scenario.
Best regards Petar.
Petar,
I already have tried these methods but actually its also not fitting to my senario. Actually I need something like if u enter a number this number goes from that event to server and server calculate new values. If I do this thing in edimodeended event. It will raise requests for those values as well which I dont want to recalculate like. If I mistakenly select a cell and on leaving cell it ill raise a request for recalculation. So its not fitting to my senario can you please suggest something else.
Thanks.
I see, but even if there was such an event it would not be sending updates to the server if there isn’t anything to update (if the values hasn’t been changed) just like the update events are acting. I suggest you reconsider your approach. Nevertheless I have found a way for your to capture the “value being edited and remain the same” action using these three events:
public object startValue;
public bool valueTypedIn;
private void xamDataGrid1_EditModeStarting(object sender, EditModeStartingEventArgs e)
{
startValue = e.Cell.Value;
valueTypedIn = false;
}
private void xamDataGrid1_CellChanged(object sender, CellChangedEventArgs e)
valueTypedIn = true;
private void xamDataGrid1_EditModeEnded(object sender, EditModeEndedEventArgs e)
if (valueTypedIn)
if (e.Cell.Value.Equals(startValue))
// DO YOUR STUFF HERE :}
Hope this is what you needed. Please let me know if I can assist you further on the matter.
Hi Petar,
Thanks for the suggestion yes its a work arround I already have done my work in this way but I was wondering if i could avoid multi event handling and flags in an optimized way. Thanks any ways for your help.