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
25
Bind to grid with JSON data using MVC helper?
posted

Is this possible? Rather than pass an IQueryable object to the grid constructor, I just want to set the Datasource to a JSON string I already have.

@(Html.Infragistics().Grid(Model).ID("grid1")

I want to do this instead (doesn't compile)

@(
Html.Infragistics().Grid().ID("grid1").Datasource(myJsonString)



Parents
  • 25
    posted

    Excuse me, that would actually be something like this

    @(Html.Infragistics().Grid().ID("grid1").Datasource(Model)

    where of course the view's model is a JSON string.

    By the way, is it such a good idea to preserve formatting on paste like this? There's not even a clear formatting button on the toolbar.
Reply Children