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
2165
Rebind to Json datasource
posted

I have a test igHierarchicalGrid of two levels, initially it is populated in the view like this:

@(Html.Infragistics().Grid(Model.AsQueryable())....

The grid is working perfectly. I want to simulate an update to this grid so I make a call to GetNewData() action in the controller and return a Json with new data. In the client I rebind to this new data but nothing change in the grid. Look at the sample I have attached.

How to rebind this new json data to the grid? 

TESTGRIDREBIND.rar
Parents
No Data
Reply
  • 15320
    Offline posted

    Hello Luis,

    I've modified your project with the following changes:

    - changed the model that was passed to the grid

    - as a consequence of the above I defined both columns for parent and child layouts

    - added "ResponseDataKey" properties for both parent and child grid

    -  added a separate action in the controller that returns the whole data and pass it as a parameter to DataSourceUrl in the grid configuration

    - removed calling of 'dataBind' method after setting the new datasource, because it seems that it re-binds to the old datasource

    Attached you can find the project for your reference.

    If you have any questions, please let me know.

    Regards,

    Tsanna

    MvcApplication1.zip
Children