I want to stop or warn a user of the deletion of a feature in the RowDeletedEvent. When the user tries to delete the field I want to ask them if they are sure. I want to roll back or something if they don't want to delete the item.
<SPAN class="keyword token">protected</SPAN> <SPAN class="keyword token">static</SPAN> <SPAN class="keyword token">void</SPAN> <SPAN class="token function">onRowDeleteEvent</SPAN><SPAN class="punctuation token">(</SPAN>RowChangedEventArgs args<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
<SPAN class="keyword token">try</SPAN>
<SPAN class="punctuation token">{</SPAN>
MessageBox<SPAN class="punctuation token">.</SPAN><SPAN class="token function">Show</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Are you Sure"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Are you Sure"</SPAN><SPAN class="punctuation token">,</SPAN> System<SPAN class="punctuation token">.</SPAN>Windows<SPAN class="punctuation token">.</SPAN>MessageBoxButton<SPAN class="punctuation token">.</SPAN>YesNo<SPAN class="punctuation token">,</SPAN> System<SPAN class="punctuation token">.</SPAN>Windows<SPAN class="punctuation token">.</SPAN>MessageBoxImage<SPAN class="punctuation token">.</SPAN>Warning<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="comment token">//ROLL BACK HERE?</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="keyword token">catch</SPAN> <SPAN class="punctuation token">(</SPAN><SPAN class="token class-name">Exception</SPAN> e<SPAN class="punctuation token">)</SPAN>
<SPAN class="punctuation token">{</SPAN>
ProMapBlackLogWriter<SPAN class="punctuation token">.</SPAN><SPAN class="token function">logError</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">"ProMapBlackModule - onRowDeleteEvent"</SPAN><SPAN class="punctuation token">,</SPAN> e<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN>
<SPAN class="punctuation token">}</SPAN>
<SPAN class="punctuation token">}</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>