Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
205
Grid not updating MVC Model
posted

I'm trying to use the IgniteUI Grid control with MVC. The data appears in the Grid properly when viewing, but when I call my Edit ActionResult method in my controller to save the view back to the model, the property that is bound to the Grid comes back as being null while all other fields have their correct values. The Grid only renders a single property of the model, not the entire thing. I cannot figure out what I need to do in order to get the Grid to push its data into the view and back to the model when saving.

I have attached a stripped down example of what I am trying to do. The real code has a lot more properties, all of which get their correct values except for the Grid.

Any suggestions as to how I can the Grid data to be sent back with everything else? Do I need to call something in order for the Grid to save its data so that it's sent back with the rest of the view data?

Thanks.

example.zip
Parents
  • 17590
    Offline posted

    Hello Keith,

    Thank you for posting in our community.

    I believe that the following article from our documentation regarding Updating overview will help you achieve better understanding how igGrid Updating feature works.

    http://www.igniteui.com/help/iggrid-updating

    Basically, igGrid communicates with igGrid MVC Helper wrapper to persist changes on the server. This feature uses transactions to log changes made to the grid. These transactions are kept locally in the browser until the igGrid.saveChanges API method is called to send a POST request to the Url indicated by the grid.updateUrl option. On the server these transaction should be parsed and processed and the igGrid MVC helper wrapper greatly simplifies this task. A working sample illustrating how basic editing works could be found at the following link:

    http://www.igniteui.com/grid/basic-editing

    I hope you find my information helpful.

    Please let me know if you need any further assistance with this matter.

Reply Children