Sunday 15 July 2012

Refresh with parameters in the Kendo UI Grid with AngularJS -


I am trying to use the Condo UI Grid with AngularJS, where I define the grid like this:

  & lt; Div id = "grid" kendo-grid = "grid" k-options = "grid options" />  

I then set the option in the controller, such as:

  $ scope.gridOptions = {height: 543, scroll: {virtual: true}, Data: 'Jason', Data type: 'Jason', ServerPaging: True, ServerSurring: True, Pages: 100, Transport: {read: {url: '/ C99_JsonService / F20_GetTrattativePerRicercaConFiltro', Data type: 'ID: 9, stato: $ scope. Statomacchina, Ascitto: $ scope. Acetotretative}}}, schema: {data: function (results) {return results. Data || Result;}, total: work (result) {return result: results Length || 0;}}}};  

As you can see, I have some other custom parameters to use in the request, and they are connected to the angular variable.
First go to the well loaded things and get me the right data.
Then, I added a button to the user to refresh the grid with new values ​​edited in the UI, connected to 'acetotratativa' A 'statomaacquina'. The following function has been tied to the button:

  $ scope.esegui = function () {$ scope.grid.dataSource.read (); $ Scope.grid.refresh (); };  

When I click on the button (executes the function 'esegui'), the request is sent back to the server, but with the original values ​​in the variable, even if I think Has changed to the real value parameters: It seems that there are some customizations that use cached values ​​... or am I missing anything important?
Thanks for all.
Andrea

It is possible to send parameters when you read it

  

No comments:

Post a Comment