Hello,
I have created the Ignite Grid using MVC Wrapper. I have given the datasource url as following:
DataSourceUrl(Url.Action("GetPagedUsers", "User"))
So, when the page (which contains the Grid) loads the Grid automatically sends a request to this url. I need to prevent the Grid from automatically requesting the server for data when the page loads.
I have tried a workaround for this: return false from the event "iggriddatabinding", but then the Grid never shows.
Any ideas how to achieve this?
Regards,
Arfan Baig
Hi Arfan,
if you specify a Model initially, the grid won't make a request to load the data, because the data will be sent inline with the initial request for the page:
<%= (Html.Infragistics().Grid<DataTable>(Model).ID("grid1").
(that is an example)
Let me know if this is what you have in mind.
Thanks,
Angel
Hi Angel,
Thank you for providing the solution.
Actually, I don't want the grid to show any data until a condition is met. And, the condition is known, once the page loads. So, I don't need to request and show the data in the Grid if the condition is not met. Hence, I need a way to block the first request that Grid makes for the data.
Hope, I've explained what I need.
In that case you can hook to the dataBinding grid event, and cancel it if your condition is not met. this will cancel any requests & rendering of data.
You can have a look here for more details:
http://help.infragistics.com/jQuery/2013.1/ui.iggrid => Events
Hope it helps. Thanks,