Editable Pivot

5 posts, 0 answers
  1. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jun 2008

    Posted 05 Feb 2018 Link to this post

    The documentation tells how to make PivotGrid editable using the overrides of the EditProvider, but really doesn't show how to override.  Any chance there is an example of this working? 
  2. Dinko
    Admin
    Dinko avatar
    999 posts

    Posted 07 Feb 2018 Link to this post

    Hi Kevin,

    Currently, we don't example which demonstrates creating a custom class which inherits EditProvider and overrides its methods. Basically, you can create a custom class which derives from EditProvider. Then you can set this custom class to the EditProvider of your RadPivotGrid.
    public class CustomEditProvider : EditProvider
    {
        // Overrides the desired methods here
    }
    public MainWindow()
    {
        InitializeComponent();
        this.pivotGrid.EditProvider = new CustomEditProvider();
    }

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
  3. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jun 2008

    Posted 07 Feb 2018 Link to this post

    Yea, I get that.  How about an example of the methods that need to be overridden, and example of what the code looks like to make the edit work?  For instance, I can override the EnableValidation and set to false, but I still get a validation error, so obviously I am missing something.  I am surprised that you guys introduced the new functionality and did not put example code out there that actually works, a video showing it working just doesn't help much.

     

    Thanks,

    Kevin

  4. Kevin
    Kevin avatar
    5 posts
    Member since:
    Jun 2008

    Posted 11 Feb 2018 in reply to Kevin Link to this post

    Dinko,

      Any chance you had time to put together, or found the code example for the edit functionality that can be shared?  I am hoping for a simple example that allows a value to be changed.  As of now , the edit ended never gets fired so I Cannot catch the change.  I just don't have a handle on what needs to be done in the overridden methods of the editprovider.  I am guessing that the PrepareEditor is where I am lacking.  Some guidance would be much appreciated.

    Thanks,

    Kevin


  5. Dinko
    Admin
    Dinko avatar
    999 posts

    Posted 12 Feb 2018 Link to this post

    Hello Kevin,

    Let me elaborate first that the new Editing functionality provides only a visual representation for the editing operation but the actual process should be handled entirely by the developer. Each cell in the RadPivot grid shows data. This data is in numeric format and is aggregated based on some description. For example, quantity of items sold in January. You have sold a different number of items on different days. So if you want to edit the quantity for this month it is up to you to decide on which day you sold more or less. 

    To edit a value in a cell you can subscribe to the EditEnded of the RadPivotGrid and create custom logic for changing given value. I am attaching sample project which demonstrates a simple scenario how you can change a value in a cell. In the example, the logic works only for the Sum of Quantity row.

    Regards,
    Dinko
    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top