Question about CheckRulesOnCurrentRow


Author
Message
StarkMike
StarkMike
Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)
Group: Forum Members
Posts: 436, Visits: 944
I have a BO on a form with a BBS. I have a DevExpress Grid connected to the BBS. When I edit information in the grid and then move to the next row the CheckRulesOnCurrentRow event isnt being fired.



Is there another way that I should validate the data in the fields before i move to the next row?
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
You can turn off the CheckCurrentRowBeforeNavigate property by setting it to false and that will turn off the checking of the rules before you navigate away from the row.  When you save, all of the rules will be checked, so on a grid where you always have multiple modified rows, I'm not sure you really need to check the rules before you navigate away from the record.  You can, of course, call a rules check whenever you feel like it by just calling CheckRulesOnRow().

When we use a grid, we also generally add a readonly bindable property called something like "HasBrokenRules" and hide the data column so that it doesn't show up in the grid.  Then, when the user tries to save, we have the grid either filter or sort on that column so that all of the records with broken rules get grouped together so the user can quickly see the records they need to fix to allow them to save and close the form.

StarkMike
StarkMike
Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)Advanced StrataFrame User (532 reputation)
Group: Forum Members
Posts: 436, Visits: 944
Thanks for the info.  And thats a great idea about the HasBrokenRules field. Wink
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search