Guest User

Untitled

a guest
Jan 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. onMoveActionMessageReceived = function (data) {
  2.  
  3. $("#resultGrid").data("kendoGrid").dataSource.read();
  4. WebSyncClient.UnsubscribeToMoveTransactionActions($('#moveTransactionIdTxt').val());
  5. }
  6.  
  7. refreshSearchData = function (entityId, entityType) {
  8.  
  9. getSearchResultViewItem(entityId, entityType, function (data) {
  10.  
  11. var kendoGrid = $("#resultGrid").data("kendoGrid");
  12.  
  13. if (kendoGrid) {
  14. if ($('#SelectedTypeId')[0].value == entityType) {
  15. var items = kendoGrid.dataSource.data().toJSON();
  16.  
  17. for (var i = 0; i < items.length; i++) {
  18. if (items[i].Id == data.Id) {
  19. items[i] = data;
  20. break;
  21. }
  22. }
  23. kendoGrid.dataSource.data(items);
  24. }
  25. }
  26. });
  27.  
  28. };
  29.  
  30. getSearchResultViewItem = function (entityId, entityType, callback) {
  31. $.get(baseUrl + 'Search/GetSearchViewDtoById', { id: entityId, searchTypeId: entityId }, function (data) {
  32. callback(data);
  33. });
  34. };
Add Comment
Please, Sign In to add comment