Exception Im getting on second time binding,
javaScript runtime error: Changing the following option after the igGrid has been created is not supported: fixedHeaders
To be short, I want to know how to verify igGrid instance existing in razor before rebinding.
Please provide some asp.net mvc razor sample
Hello Senthil,
Ignite UI controls are written in JavaScript. They are created and executed in the browser.
Razor code is executed on server-side so you can only configure the igGrid instance before it's actually created. Even you have configured the grid in Razor at runtime you should use the igGrid API to test whether a current instance exists.
Here is the code in JavaScript
if ($("#grid1").data("igGrid") !== undefined)
{
// grid is created
}
Note that some options cannot be changed at runtime, because they require different igGrid DOM structure. That's the case with fixedHeaders. In this case you should re-create the igGrid. Re-creating a control can only be done in JavaScript.
Best regards,Martin PavlovInfragistics, Inc.
Thanks for information.
My requirement is every user time navigates to particular page, brand new igrid instance has to be created with same old structure by removing the old instance without any residue
Can you please provide sample to remove old instance altogether from browser and to recreate new igrid instance with same same structure as old.
Store the options of your current grid configuration:
var options = $.extend({}, $("#table1").igGrid("option"));
Destroy the current grid instance:
$("#table1").igGrid("destroy");
Create new igGrid using old configuration:
$("#table1").igGrid(options);
Looking forward your response please let me know for any clarification on my query