Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

Passing current DataSourceRequest to a custom command

$
0
0

Hello Alexander,

I am trying to save the Filter criteria of the grid. But for some reason I am not able to send the DataSourceRequest to action method. This is what I am doing. 

 toolBar.Custom().Text("Save Filter").Url("javascript:SaveFilterClicked()");

 function SaveFilterClicked(e)
    {
        var data = JSON.stringify(this.dataSource.view());
        $.ajax({
            url: '/MyController/SaveFilter',
            type: 'POST',
            data: data,
            async: true,
            processData: false
        });
    }

 But this.dataSource is "undefined". Can you guide me through a better way of doing this

 

Thank you

 

 


Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>