Welcome to the Xceed Community Sign in | Join | Help
Community Search  

IEditableCollectionView of .net 3.5 SP1

Sort Posts: Previous Next
  •  05-14-2008, 9:42 AM Post no. 12249

    IEditableCollectionView of .net 3.5 SP1

    Hello

    I just see on the contents of 3.5 SP1 (http://weblogs.asp.net/scottgu/archive/2008/05/12/visual-studio-2008-and-net-framework-3-5-service-pack-1-beta.aspx) , this two news feature :

    • IEditableCollectionView support to interface data controls to data sources and enable editing/adding/removing items in a transactional way
    • Item-level validation that applies validation rules to an entire bound item

    I have not installed this SP1 on my computer BUT this tips seems very interresting.

    Could you explain me if you will integrate this news concepts in your datagrid ?

  •  05-15-2008, 9:19 AM Post no. 12301 in reply to 12249

    Re: IEditableCollectionView of .net 3.5 SP1

    Hi,

    We have looked at the new stuff in SP1, and will definitely leverage the 2 features you mention. However, it will not be in our next release (planned for this summer), as the SP1 is still in beta and implementing/using those new interfaces (e.g. IEditableCollectionView) introduced in SP1 would create a strong dependency on SP1. So our actual plan is to wait for the final release of SP1, then make our next DataGrid update target the SP1 and leverage those new APIs.

    But the good news is that we have already refactored our data editing/validating engine, so the upcoming release of the DataGrid will allow for much greater flexibility with regards to validation than it currently does.

    Pascal

  •  06-01-2008, 7:41 AM Post no. 12607 in reply to 12301

    Re: IEditableCollectionView of .net 3.5 SP1

    Hello

    Thanks for your answer !

    another question architectural question :

    I downloaded the 3.5 SP1 beta on my computer to know how IEditableCollectionView and another important interface and feature is implemented in framework (with Reflector utility)

    IEditableCollectionView, IEditableObject and and another new interface is just implemented and connected in this 3.5 SP1 BUT no methods in framework calls the method of these interface !! >>> it is just inserted in framework for new feature in the future ... I am not sure but I think it is true ...

    For example, IEditableObject (from System.Dll, System.ComponentModel) is supported by System.Data.DataRowView (from Dataset world) and so, IEditableObject is used by BindingListCollectionView of System.Windows.Data, PresentationFramework.dll but no methods call the facade on this interface !!!

    in concret scenario :

    If I have a datagrid (xceed for example) and another component like textBox on the same source (*) by Data Binding system of WPF Framework , and If the items of my datasource supports IEditableObject, It would be nice that IEditableObject.BeginEdit method is called by framework if the user try change the value by datagrid OR by TextBox too !!!!

    I Would implements all data validation in one place only and I prefer to implements it near the data and not near the UI ... With current framework and your datagrid, it is not seem possible ...

    What is your opinion about this ? 

    bests regards

    Thibaud. 

     

     (*) : on the same IList or IBindingList or IObservableCollection source, with each item supports IEditableObject ...

     

     

     

     

     

  •  06-02-2008, 11:50 AM Post no. 12620 in reply to 12607

    Re: IEditableCollectionView of .net 3.5 SP1

    Hi,

     Currently, when the DataGrid catch an exception coming from the call to IEditableObject.EndEdit method, the values will rollback however you won't have a visual cue that an error occured.  This is something we are working on.

    Concerning the textbox and the IEditableObject interface, it is to my understanding that you will have to call BeginEdit/EndEdit on your object manually.

    Something else we are working on for the next version is the IDataErrorInfo interface support.  This might be of help to you as setting a DataValidationRule on your textBox Binding will give a visual cue when it fails.  We are hard at work to make the DataGridControl react and show an error on the corresponding cell/row simultaneously.

     Regards,

    Pierre-Luc


    Pierre-Luc Ledoux
    Software Developer
    Xceed Software Inc.
  •  06-02-2008, 3:20 PM Post no. 12629 in reply to 12620

    Re: IEditableCollectionView of .net 3.5 SP1

    hello

    thanks a lot for your answer. I agree with you, We need to call BeginEdit/endEdit manually with the text box, I search a controler approch to concentrate all the code in one class (with RoutedCommand like KeyPress and so on ...) to do this ... not sure I will be able to do this ...

    The information about IDataErrorInfo is very useful >> we will need to develop our data buffer (or use another to supports it) for our input forms  with this interface  ...

    BUT for the rollback function when an error occur during EndEdit call, the Datagrid rollback the value or the item source (witch supports IEditableObject) ? I would prefer that the item object rollback his values but It is necessary to implement it ...

    In fact, I doubt between two approch to develop my input buffer :

    use Dataset classes (DataTable, DataRow and so on ..)

    or

    use my own data buffer (with my own model language) ...

     >> Dataset is very well integrated in WPF (with BindingListCollectionView ...), IDataErrorInfo, IBindingList, IEditableObject on DataRowView, etc ... is used by WPF integration (in SP1 too) but Dataset is old classe (came from .net 1.0)

    For example, a big part of DataView of Dataset world is implemented too in CollectionView of WPF world (Sorting, Grouping, filtering)

    >> could you give us your point of view about this problem ? your customer use only Dataset, Class collection, or something else ?

    best regards

     

  •  06-04-2008, 4:16 PM Post no. 12700 in reply to 12629

    Re: IEditableCollectionView of .net 3.5 SP1

    Hi,

     The DataGridControl has a built-in rollback mechanism, but still calls the IEditableObject's CancelEdit method.  This makes for a robust rollback system and enables developers who bind to collections of objects not implementing the IEditableObject interface to benefit from this built-in functionality.  Since CancelEdit is called, if your business object does implement a rollback logic, it will still be used.

     In order to obtain the most out of the DataGridControl's functionalities (and to improve the speed of grouping, sorting, and so on ), we highly recommend binding the DataGridControl to a DataGridCollectionView, itself using as a source your collection, DataSet, BindingList, or any other list of your choice.

    Concerning the inner source, it all comes down to your needs.  If you need insertion support, then any IBindingList would be fine. 

    A distinction between ObservableCollection and IBindingList is that the ObservableCollection won't notify when the content of an object changes.

    However, those are only the built-in behaviors.  You can always derive and tweak those behaviors.

    I am not really able to give you more information about our customers' business logic since most of them do not contact us or question us about their data source.  This falls more into the realm of application design than DataGrid's usage.  It might still be intersting to poll our customers on this topic though.

    Regards,

     

    Pierre-Luc


    Pierre-Luc Ledoux
    Software Developer
    Xceed Software Inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2008 Xceed Software Inc.