StrataFrame Forum

Question about CheckRulesOnCurrentRow

http://forum.strataframe.net/Topic7449.aspx

By StarkMike - 3/13/2007

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?
By StrataFrame Team - 3/13/2007

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.

By StarkMike - 3/13/2007

Thanks for the info.  And thats a great idea about the HasBrokenRules field. Wink