ODataCollectionView and editable flexgrid

Posted by: petr.somek on 6 October 2020, 12:54 am EST

    • Post Options:
    • Link

    Posted 6 October 2020, 12:54 am EST

    Hi,

    I’m using FlexGrid with ODataCollectionView as its datasource.

    I don’t understand, why is my grid readonly. What do I have to do to be grid editable?

    
        var url = 'https://services.odata.org/V3/(S(2h5mxmxszuxcahkqmrgzkel0))/OData/OData.svc';
        var ds = new ODataCollectionView(url, 'Categories', {
            sortOnServer: true,
            filterOnServer: true 
        });
    
        var theGrid = new FlexGrid('#theGrid', {
            itemsSource: ds,
    		isReadOnly: false
        });
    
    
  • Posted 6 October 2020, 9:16 pm EST

    Hi Petr,

    While using ODataCollectionView, you will need to provide the keys property so that the collection view can update the data on the server using the keys. Otherwise, you will not be able to edit the data in the flexgrid.

    https://www.grapecity.com/wijmo/api/classes/wijmo_odata.odatacollectionview.html#keys

    Regards,

    Ashwin

  • Posted 13 October 2020, 3:20 am EST

    Your hint works well. Thank you.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels