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
960
MVC & iGrid How to update both grid data and other data on the same page when using UpdateURL?
posted

Hi

I am (still) creating my first ASP.NET MVC 4 website and am using the igGrid on one of my pages.

I have the grid updating via the UpdateURL property - I can carry out CRUD operations on grid data without a hitch, I even get the IDs for new rows returned to grid rows.

I now need to have some other fields on the same page and I need to update them at the same time that I update the grid.

The fields are set up against properties in my model but I can't figure out how to access the model properties from the controller method that runs via UpdateURL.

Is this possible and, if so, can you give me a pointer as to how? As far as I can tell the controller method does not have access to the page's Model and neither does the GridModel.

It feels like I missing something obvious to the more experienced.

Thanks,

Graeme

Parents
  • 960
    Offline posted

    I have had to settle for a two stage update process (shame I can't get it all into a transaction) by implementing the post back of the form on which the grid & other textboxes lie in addition to using the UpdateURL to save the grid data.

    One Save button press will carry out a post back of the text box data and also action the UpdateURL controller method to save the grid data.

    Untidy, but will have to do for now. There must be a better way, but I can't find it.

    Graeme

Reply Children