DataRowAction... how to get determine changed values?!

  • Thread starter Thread starter Tim Mackey
  • Start date Start date
T

Tim Mackey

hi,
i have a rowchanged handler for a custom dataset class, at the bottom of this post.
when the DataRowAction is changed, then i want to do something only when the ParentID for that row has changed. if its any of the other columns i don't need to do anything. how can i figure out which parts of the row got changed? i wrote a hopeful solution below but it obviously doesn't work.
many thanks in advance for anyone's advice on this.

tim mackey.


private void RowChanged(object sender, WMDataSet.pRowChangeEvent e)
{
switch(e.Action){
case DataRowAction.Change:
if(e.Row.ChangedColumns.Contains("ParentID") ... // wishful thinking!
...
}


\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
 
Hi,
just replying to myself for the benefit of anyone with the same problem i encountered.
the rowChanged event is not the one i needed. the columnChanged event gives a finer level of detail about the values that changed, and it tells you what column in the row is being changed too. i just didn't know this event existed!

tim


\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
hi,
i have a rowchanged handler for a custom dataset class, at the bottom of this post.
when the DataRowAction is changed, then i want to do something only when the ParentID for that row has changed. if its any of the other columns i don't need to do anything. how can i figure out which parts of the row got changed? i wrote a hopeful solution below but it obviously doesn't work.
many thanks in advance for anyone's advice on this.

tim mackey.


private void RowChanged(object sender, WMDataSet.pRowChangeEvent e)
{
switch(e.Action){
case DataRowAction.Change:
if(e.Row.ChangedColumns.Contains("ParentID") ... // wishful thinking!
...
}


\\ email: tim at mackey dot ie //
\\ blog: http://tim.mackey.ie //
67d0ebfec70e8db3
 
Back
Top