﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Role Based Security  » Logical delete and then save cause error</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 00:18:08 GMT</lastBuildDate><ttl>20</ttl><item><title>Logical delete and then save cause error</title><link>http://forum.strataframe.net/FindPost20712.aspx</link><description>Hi,&lt;br&gt;
I am using DevExpress ASPxGridView to bind to SFUsersBO. When I delete record from ASPxGridView, it only "logical" delete record from BO. I need to call BO.Save() in order to commit changes to database.&lt;br&gt;
I hit error "currentRowIndex is out of range" when I call SFUsersBO.Save(). I found that is logic in SFUsersBO.BeforeSave() to log the user changes via CurrentRow property. This cause the error.&lt;br&gt;
&lt;br&gt;
How should I resolve it?&lt;br&gt;
&lt;br&gt;
Note: error would occurred if BO only has one record. If that is more than 1 records, the change log would recorded wrongly.&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Wed, 12 Nov 2008 15:53:45 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Logical delete and then save cause error</title><link>http://forum.strataframe.net/FindPost20737.aspx</link><description>Hi Chan.&lt;/P&gt;&lt;P&gt;I guess that the&amp;nbsp;SFSUsersBO is meant to integrate into the RBS, and since a user can't be deleted throuh the RBS IDE, the BeforeSave is not expecting this situation. I douhbt it if it is a good idea, but maybe you could add a new BO to your solution and map it directly to the SFSUsers table, from SQL Server. Then you would be totally in control, I guess. And not sure this would be a good idea. :D</description><pubDate>Wed, 12 Nov 2008 15:53:45 GMT</pubDate><dc:creator>Ivan George Borges</dc:creator></item><item><title>RE: Logical delete and then save cause error</title><link>http://forum.strataframe.net/FindPost20729.aspx</link><description>Hi,&lt;br&gt;
it is simple. &lt;br&gt;
In my situation, my SFUsersBO only has 1 record. I call SFUserBO.DeleteCurrentRow(true) for logical delete. After that, I call SFUsersBO.Save(). &lt;br&gt;
When I call Save(), SFUsersBO.BeforeSave() fired, and this event contains code to log changes. (originally from RBS)&lt;br&gt;
Since record is deleted (logically), the code Me.CurrentRow in SFUsersBO.BeforeSave() cause error.&lt;br&gt;
&lt;br&gt;
So, how should I resolve it without modify SFUsersBO code?&lt;br&gt;
&lt;br&gt;
Thank you</description><pubDate>Wed, 12 Nov 2008 09:59:01 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Logical delete and then save cause error</title><link>http://forum.strataframe.net/FindPost20725.aspx</link><description>Well, this could be coming from several things.&amp;nbsp; I am not sure what version you are running on here, but we fixed a CurrentRowIndex issue in the 1.6.6 release that could have something to do with this.&amp;nbsp; So if you are running on a version older than 1.6.6, then the first thing to do would be to upgrade to 1.6.6.&lt;/P&gt;&lt;P&gt;Secondly, when you run into CurrentRowIndex issues, this can come from many places within your code outside of the standard framework logic.&amp;nbsp; For example, if your BO is empty, then a column is referenced....that would produce the error, as it should since there is no row available.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I hate to be a broken record here today, but I would really need much more detail in order to help you isolate your problem.&amp;nbsp; But maybe some of these suggestions will point you in the right direction.</description><pubDate>Wed, 12 Nov 2008 09:21:48 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>