Industrial Dashboard & Dojox.DataGrid Example

In this example, the javascript code needed to invoke the stored procedure dbo.getCitiesListTR(CountryID) is:

    
    attachDomReadyEventHandler(function () {
        var ConnectionParams = new ConnectionParameters();
        ConnectionParams.add('CountryID', 'int', 1);
        var options = { 'URL': '../DALService.svc/CallProcedure', 'Procedure': 'dbo.getCitiesListTR' };
        dojoGrid = new DojoGrid(document.getElementById('dojoGridContainer'), options);
        dojoGrid.RefreshData(ConnectionParams);
    });
    

And this would be the callback of the onChange event in the comboBox

    function refreshData(e) {  
        var target = e || window.event.srcElement;        
        var value = target[target.selectedIndex].value;
        var ConnectionParams = new ConnectionParameters();
        ConnectionParams.add('CountryID', 'int', value);
        dojoGrid.RefreshData(ConnectionParams);
    };