How to visualize errors in a SmartUpdatableBrowser / SmartDataBrowser
 
Forums / SmartComponent Library - Developer Forum / How to visualize errors in a SmartUpdatableBrowser / SmartDataBrowser

How to visualize errors in a SmartUpdatableBrowser / SmartDataBrowser

4 posts, 0 answered
  1. Carl Verbiest
    Carl Verbiest avatar
    59 posts
    Registered:
    12 Oct 2018
    28 Nov 2019
    Link to this post
    Are there provisions in the SmartUpdatableBrowser / SmartDataBrowser to visualize dataset errors ?

    I'm looking for this in a TransactionCommit style form. There can be errors on multiple rows at the same time.

    I'm trying to achieve something like this https://help.infragistics.com/Help/Doc/WinForms/2012.2/CLR4.0/HTML/WinGrid_Display_Row_Cell_Errors_Using_IDataErrorInfo.html


    Last modified on 28 Nov 2019 14:11 by Carl Verbiest
  2. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    29 Nov 2019 in reply to Carl Verbiest
    Link to this post
    There is nothing prepared for that behavior in the updatable browser. 
    You can start implementing this by overriding the HandleValidationError method of the SmartUpdatableBrowser class.
  3. Carl Verbiest
    Carl Verbiest avatar
    59 posts
    Registered:
    12 Oct 2018
    29 Nov 2019
    Link to this post
    FYI
    I translated the sample into OOABL.Net but I get

    Invalid cast from Progress.Data.DummyRow to System.Data.DataRowView,
    System.Data, Version=4.0.0.0, Culture=neutral,
    PublicKeyToken=b77a5c561934e089. (12869)

    So I created a tech support case for this
    00522804 Translating Infragistics sample to OOABL.Net results in invalid cast

  4. Mike Fechner
    Mike Fechner avatar
    319 posts
    Registered:
    14 Sep 2016
    29 Nov 2019 in reply to Carl Verbiest
    Link to this post
    The Progress.Data.DummyRow is not representing a grid row. It's the data element that the ProBindingSource binds to. The DummyRow is just a System.Object. So casting it to anything will never be successful.

    The implementation seems to rely on the .NET System.ComponentModel.IDataErrorInfo interface. This interface is implemented by the DummyRow class.

    In GUI for .NET we're (the AVM is) not simulating binding to a DataRowView, as filtering is done based on the ABL Query, not on .NET rows. 

    drv.Row returns the .NET DataRow reference that is represented by the DataRowView. So at this level we'd be similar to the DummyRow.

    The way I read the ultraGrid1_InitializeRow code sample, they are setting the RowError property. If the DummyRow from Progress successfully implements the System.ComponentModel.IDataErrorInfo interface, I would expect that this is not needed. I would expect that the System.ComponentModel.IDataErrorInfo implementation is basically a facade to the ERROR-STRING property of the ABL record represented by the ProBindingSource row. Actually the IDataErrorInfo interface provides only read-only property which is in line with my expectation. 

    This would probably be an interesting discussion for Progress communities ...
4 posts, 0 answered