﻿<?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 » Business Objects and Data Access (How do I?)  » Broken rule not shown when navigating in DexExpress.XtraGrid</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Thu, 09 Apr 2026 18:55:14 GMT</lastBuildDate><ttl>20</ttl><item><title>Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8118.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I have business rule checking in CheckRulesOnCurrentRow(). When I edit and navigate to row in DevExpress.XtraGrid, error provider doesn't show error sign even there are broken rules. I have set CheckCurrentRowBeforeNavigate to True.&lt;/P&gt;&lt;P&gt;However, It does show error if I bind field to textbox or save record.&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;P&gt;Thank you</description><pubDate>Tue, 17 Apr 2007 09:49:25 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8166.aspx</link><description>The grids do not always respect the CheckCurrentRowBeforeNavigate.&amp;nbsp; The reason being that they don't use the same mechanism for the record pointer that the business object does.&amp;nbsp; The grids use the ICurrencyManagerProvider.CurrencyManager.Position property for their record pointer.&amp;nbsp; When the position within the grid is set, it fires the Navigated event on the business object, which checks the business rules.&amp;nbsp; However, if the rules fail, the BO cancels navigation and attempts to set the CurrencyManager.Position back to the previous record, however, since this is happening within the PositionChanged event of the CurrencyManager, the CurrencyManager will not respect the request to change the position within the PositionChanged event handler.&lt;/P&gt;&lt;P&gt;So, you're best bet would be to just turn off the CheckCurrentRowBeforeNavigate property and add a handler to the BO's Navigated or Navigating event and manually call CheckRulesOnRow().&amp;nbsp; It won't prevent the grid from leaving the record, but it will keep the Position and the CurrentRowIndex in sync.</description><pubDate>Tue, 17 Apr 2007 09:49:25 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8147.aspx</link><description>Hi&lt;/P&gt;&lt;P&gt;Thank you for reply. Doesn't grid respect BO.CheckCurrentRowBeforeNavigate ?</description><pubDate>Mon, 16 Apr 2007 11:18:03 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8142.aspx</link><description>Unless you call the CheckRulesOnCurrentRow method the event will not be raised with using a grid when navigating alone.&amp;nbsp; This is due to the nature of each grid and canceling a row navigation.&amp;nbsp; You can mange this yourself by calling the CheckRuleOnCurrentRow event in the Navigating event of the BO.&amp;nbsp; You will then have to cancel navigation yourself on the grid depending upon which grid you are using.</description><pubDate>Mon, 16 Apr 2007 10:59:03 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item><item><title>RE: Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8140.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;I have tested BusinessBindingSource sample. However, it doesn't show error provider for required field when navigating row. HOwever, it works for saving record.</description><pubDate>Mon, 16 Apr 2007 10:53:52 GMT</pubDate><dc:creator>Chan</dc:creator></item><item><title>RE: Broken rule not shown when navigating in DexExpress.XtraGrid</title><link>http://forum.strataframe.net/FindPost8134.aspx</link><description>I recommend that you look at the BusinessBindingSource sample that comes with the framework.&amp;nbsp; If shows how to bind a BO to a grid using a BusinessBindingSOurce while respecting the broken rules and displaying a error provider.</description><pubDate>Mon, 16 Apr 2007 09:48:21 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>