Click here to Skip to main content
15,868,016 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,
I want to add a grid on the partial view on the same page as that of view.
I also want to have dynamic grid capability for the grid. As soon as , data is inserted in the form, it should get added or updated in grid.As soon as data entry is completed, submit data from the grid to table.
How can I do this with grid.mvc?

Thanks

What I have tried:

JavaScript
<script type="text/javascript">
            $(document).ready(function () {
                $('#add').click(function () {
              
                    $("form").attr("action", "FillGrid");
                    $('#result').load('FillGrid');
                    $('#result').toggle('slow');
                });
            });

And FillGrid is given as follows -
C#
public ActionResult FillGrid(FormCollection form)
      {

          List<string> flatlist = new List<string>();

          flatlist.Add(form["Address"].ToString());
          flatlist.Add(form["Area"].ToString());
          flatlist.Add(form["AgreementPrice"].ToString());
          flatlist.Add(form["Rate"].ToString());

          ViewData["flats"] = new SelectList(flatlist);


          return PartialView(flatlist);
Posted
v2
Comments
Prateek Dalbehera 9-Jun-16 5:38am    
hi, i think you want to show the submitted data in the partial view as soon as the form is submitted... If it is so, then reply to this so that i can post the solution..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900