The above is concept of a search interface I want to build in ASP.net MVC. when user clicks on the '+' button, it should create a row text filters or date filters. Does jQuery offer me this flexibility or are there any such UI frameworks which would help me achieve this? There is a search button, not shown, which when clicked should post back and obtain results and display the results
2 Answers
It sounds like you want to create dynamic form. Just use the Jquery .append to add new elements to your form.
$("#myform").append("<input type='text' name='textfield'>")
A little difficult to visualise what you are talking about as it doesn't show in the question.
But if I understand your question then you want to click on a button and show some filter fields right?
This is do-able not only in jQuery but in just standard javascript. All you need to do is unhide the filter elements.
jQuery will give you a nice way to scroll it open though and then you could do a partial post back and just return the results or partial view.
$("#divFilters").slideDown(300);
The code above will open your div.
Or you could jQuery a partial postback, return RenderPartial from your controller and replace the html in a div somewhere. The RenderPartail would be a partial view with your filters in it. Easier to extend at a later date too I'd have thought.
Is this what you were after?
