Hi,
After saving the iggrid data to database, I wanto to rebind the data to iggrid in jquery. I have written the below code and I am getting the error. For the error info, please refer the screen shot and suggest me the solution.
$("#gridNotes").igGrid("dataSourceObject", data.GetNewNotesList);
$("#gridNotes").igGrid('dataBind');
Hello Ramesh,
Thank you for using Infragistics forums!
There could be a variety of reasons for this exception. Please, ensure that data.GetNewNotesList contains a valid object that can be used as the data source of the grid based on the grid's options. It should have the same structure as the original data source.
If you could share a small sample that reproduces the issue it'll help a lot.
Best regards,
Stamen Stoychev
Thank youfor your response. FYI, both the datasource structures are same. My requirement is I want to rebind my igHierarchicalGrid after button click.Please suggest
In order to change the data source and/or data bind a hierarchical grid you'll have to make the calls to the igHierarchicalGrid widget. Changing the data source can be achieved with the following:
$("#grid1").igHierarchicalGrid("option", "dataSource", newDataSource);
The hierarchical grid will do the data binding for you so no "dataBind" is needed after the option change.
I am attaching a small sample demonstrating these.
Please, let me know if you have any other questions or concerns!
Hello,
I am checking about the progress of this issue. Please let me know If you need any further assistance on this.
Given the description of the issue it is a bit hard to determine what could be the cause of it. Could you please describe in more detail how you are getting the data and what the grid definition looks like? Some code snippets or a small sample reproducing the issue will help a lot in pinpointing the cause.
I am looking forward to hearing from you!
Thank you for the response. Your code is working for json. I am using generic list to bind the data to grid.I have tried to bind this after the button click again. I am getting the data into this list,bit not able to bind .Same error.
While we are binding the data next time, seems it is not seriaizing.Please hellp me