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
115
Init empty Grid by MVC Wrapper
posted

Hi!

I tried to migrate an ASP.Net MVC project from 2015.2 to 2016.1.
I initialize my controls by the MVC wrapper, because its very easy.
I don't set a DataSource or DataSourceUrl, because in the most cases i set them dynamically in JavaScript afterwards (for example i add a url-get-parameter in reference to an other object).

This behaviour is no more possible in 2016.1. I always get an exception with undefined or null property "Records".

You can test this by your sample project. Just remove the line with "DataSourceUrl" in "Views\Grid\aspnet-mvc-helper.cshtml" and call the page in your browser.
In 2015.2 you get an empty Grid, in 2016.1 you'll get an exception.

It would be great if you can give me a workaround to use them.
I also would like to see an alternative for sending a parameter in the databind-method to the controller by adding a get-parameter to the DataSourceUrl.