FlexGrid DisableServerRead Refresh

Posted by: 048alexsandr1992 on 10 October 2017, 7:11 pm EST

    • Post Options:
    • Link

    Posted 10 October 2017, 7:11 pm EST

    Hi,

    If I use

    DisableServerRead = true

    not work

    grid.collectionView.refresh()

    How refresh grid in this case?

    In this link use ajax

    https://www.grapecity.com/en/blogs/flexgrid-ajax-data-binding-in-asp-net-mvc/

    is there a simpler solution ?

  • Posted 11 October 2017, 2:27 pm EST

    Hi Alex,

    You can always call Load method instead of cv.refresh(). Is that not suitable for your case?

    ~nilay

  • Posted 11 October 2017, 6:18 pm EST

    Load its standart method? I can’t find it.

    or you mean

    
    <script type="text/javascript">
        function Load() {
            $.ajax({
                type: "POST",
                url: "/Home/GetData",
                dataType: "json",
                success: function (result) {                
                    var flex = wijmo.Control.getControl("#fg");
                    flex.itemsSource = result;
                },
                error: function (err) {
                   
                }
            });
        }
    </script>
    
    

    ?

  • Posted 11 October 2017, 8:49 pm EST

    Hi Alex,

    We are referring to the function Load().

    ~Manish

  • Posted 11 October 2017, 9:04 pm EST

    Ok, thanks

  • Posted 12 October 2017, 4:41 pm EST

    I find more good solution how to refresh:

    
    if (grid.collectionView._disableServerRead) {
                grid.collectionView._disableServerRead = false;
                grid.collectionView.refresh();
                grid.collectionView._disableServerRead = true;
    }
    else
                grid.collectionView.refresh();
    
    
Need extra support?

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

Learn More

Forum Channels