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
515
Regarding datasource
posted

Hello everyone,

So , i am using data source and datasourceurl in my grid.When grid is loaded initially its fetched data from method specified in data source and then i make any changes like sorting and all it call method specified in data source url.When i m trying to remove data source it should fetch data from the method specified in datasource url but the call to that method is not going when i m checking in debugging mode.So why is that happening.

Documentation :- from which to fetch data, after the grid has been rendered for the first time (if DataSource is not set and the grid is rendered) it will use the DataSourceUrl to fetch rows (the backend doesn't need to match the MVC backend in that case)

Code : dataSourceUrl: "/Student/Data12",
dataSource: "/Student/Data",(WHEN i remove this it doesnt go to datasourceurl method)
r

Parents
No Data
Reply
  • 1300
    Offline posted

    Hello Rohit,

    After an investigation, I have determined that when dataSourceUrl is used instead of dataSource property, the dataBind method should be called after the initialization of the grid. By calling dataBind, the dataSourceUrl method in the controller is executed as expected. This could be achieved as follows:

    $("#grid").igGrid({

        primaryKey: "ProductID",

        renderCheckboxes: true,

        . . .

        dataSourceUrl: "/Home/DataUrl",

        . . .

    }).igGrid('dataBind');

    Please test it on your side and let me know if you need any further information regarding this matter.

    Regards,
    Monika Kirkova,
    Infragistics

Children
No Data