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.
Related
I have multiple kendo upload controls among those I need to clear one of those not all controls. I am trying
$(".k-delete").parent().click();
but I want clear based on its ID rather than class name. Please can anybody help me
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.
I am very new to MVC. I am coming from web forms.
I have a simple search page. The user has option of searching contacts by state. I have a multi select box where they can select multiple states and click search contacts.
The result contacts will be displayed in a grid. The grid has options of edit,details and delete.
When they click delete it goes to a different page and asks for confirmation. Once they click delete and its done succesfully i am redirecting to the search page. But i want to redirect them to the same list they have earlier.
How i can acheive this with MVC ??
I am storing the selected state ids in an integer array in the view model.
You could try doing a modal popup and then doing an Ajax request and bind the results to a Partial view on the page.
Ie. $('#partialDiv').load( your controller call here )
Might make for a better experience...
I have a MVC 3 application with Razor. The form is data driven and has a series of testboxes and radio buttons and a file upload control. The textboxes and radiobuttons reside in first form and the upload control is in its own form. If the file is uploaded first then everything is fine. But if say the user fills in the form with the textboxes and radio buttons and then browse's to the file to attach and clicks attach (a submit button) within the 2nd form, the whole page is posted back and all the controls loses their values and its not user intutive. As I am trying to do the file upload and uploading the file on the server as a separate task on the form, I am not able to find any examples on the net for such a scenrio. All I find is people doing form elemnets and file uploads in one subit action. My requirement is such that the file upload is kept seperate so that users can attach files and also remove files which are attached, so only when they are happy do they submit the form. Any pointers welcome.
Here's an approach you could try and which seems adapted to your scenario:
Use AJAX (or Flash/Silverlight/HTML5) in order to upload the file to avoid page reloads. There are many plugins and possibilities out there: plupload, uploadify, jquery form, ..., just pick one that suits you.
When the user uploads the file store it on the server on some temporary location and return an unique id so that later you could fetch this file.
On the client use the id to inject it into a hidden field on the first form (the one that contains all the textboxes and radios).
When the user submits the first form the id of uploaded file will be sent to the server and you will be able to fetch the file that was uploaded.
This approach could also allow you to upload multiple files. Just play with jQuery and manipulate the array of hidden fields (add, remove, ...).
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, ...)?