Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BrokenRuleCount returns 0 but there are broken rules
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01178115
Message ID:
01178363
Views:
20
Brian,

>If Me.oExport_Detail.Rules.HasBrokenRules Then
> Dim myBrokenRules As New Collection
> Dim IndexBrokenRule As Int32 = 0
> Dim orule as OakLeaf.MM.Main.Business.mmErrorProviderArgs
> Dim strDLN As String = ""
> For IndexBrokenRule = 0 To Me.oExport_Detail.Rules.BrokenRuleCount - 1
> orule = Me.oExport_Detail.Rules.GetErrorProviderRule(IndexBrokenRule)
> strDLN = dsDetail.Tables(0).Rows(orule.Row).Item("DLN")
> strDLN = strDLN.Substring(4)
> myBrokenRules.Add(New ExportBrokenRulesEventArgs(strDLN, orule.ErrorText))
> Next
>endif

Instead of checking Rules.BrokenRuleCount you need to check Rules.ErrorProviderBrokenRuleCount.

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform