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
280
Binding Empty Data Source Remote
posted

Hello,

We are using a remote data source with igGrid (Infragistics version 2013.2) in an ASP.NET application.

The behavior we are after is that when the user enters a filter value that doesn't exist in the grid, our server web method (that the grid automatically calls on remote sorting) will return an empty row set (but a full column set) so that the grid can still keep its auto generated columns but have no rows. Currently we are building the JSON string on the server and pushing it back to the client via HTTP response. How would the JSON string need to look in order to bind the columns but no rows in igGrid?

Since our data sets are user generated and we cannot know what columns will be included until runtime we are using autogeneratecolumns : true in igGrid.

An example of our JSON with rows:

 {
"totalRowCount":1,
"data":
    [{"ColA" : "A"},
    {"ColB" : "B"}
    ]
}

How do we return that JSON if it had 0 rows?

Parents Reply Children
No Data