I have a jQuery Grid that loads the data on web API call, onclick of Edit button that is in each row of the grid, it takes the Id of the record and a jQuery dialog opens that loads a partialview that contains all the details of that record, On the dialog I Edit the data and Update the database. In the database the data are updated properly.But the grid Does not refresh after the dialog closes.
I have a dropdown also on the page that causes the filteration of data in the jQuery grid based on it's selection.It works fine always but after the dialog closes and On change of this dropdown list selection the request to the web API to load the grid with updated data does not go.
Once the update is successfull, try calling $('#id_of_the_grid').trigger('reloadGrid'); before you close the dialog.
Related
I have been trying to show some content in dataTable after submitting but I need to keep the values that I passed to controller without refreshing even though I tried to get the value on and set in that element by using onSubmit function it's still refreshing and the entered data are gone and new data refreshed, How to prevent this Homies ?
I'm using kendo for my client side framework using MVVM single page application architecture for a multi page MVC app that I'm currently working on. What happens is there are 4 pages/steps in total in which the first 3 steps requires users to enter in some information and hitting the next button and using kendos router function to route to the specific page on button "Next" press.
Each pages values depends on the previous page, so in page 1 user would enter in some user ID's, on next button click it will call an AJAX call to my controller method passing in a viewmodel from the view and then returning some values based on those ID's and load them on page 2.
Because the values are loaded based on a kendo observable viewmodel from the view on page 1, if the user was to refresh on page 2, the values would all become null since the refresh would basically wipe out all the values saved in the viewmodel or if the user presses the "Previous" button or the back button on the browser whatever values they entered on page 1 would also be empty instead of displaying the previous values they've entered.
Main question would be is this the right architecture for what I'm doing? Should I just be doing standard MVC and passing my viewmodels/populating my screens from the server side so my values would never be null but on refresh it would just always hit the server side code.
If a single page application architecture is fine for such an application what would be some solutions for this problem?
Thanks
I have the following scenario: I'm using a kendo CRUD grid (MVC) and for each row a user should be able to upload a template. My question is if is possible to send the uploaded templates when the user press Save.
I have a table which always updates by clicking on another link. This link has ajax functionality which is created by serverside API at run time and JQuery has no control over this link.
Now whenever this link changes table, I want to call a function by JQuery, how do I do that?
I'm trying to use the jquery UI dialog component to display a form; which I successfully did.
However I'm at lost on how to retrieve data to this form inside the dialog window. Is it possible? The example shown on jquery website only shows static messages.
Maybe you can tell us more about the problem. What data do you want do display and in which format is this data (is it form data, javascript objects, dom objects, etc.?)
You talked about a form which is shown via a dialog. Where do you want to access this form data (when the dialog is closed, opened, when the form is submitted, ...)?