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
45
changing the following option after the igGrid has been created is not supported: fixedHeaders
posted

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

Parents
No Data
Reply
  • 23953
    Offline posted

    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 Pavlov
    Infragistics, Inc.

Children