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
445
Cannot call methods on igGrid prior to initialization; attempted to call method 'addRow'
posted

Hi guys, i am having another problem this time -adding row programatically..

so i am using jquery-1.9.1.min, jQuery UI - v1.10.3 and ignite ui version 13.2.

to solve the problem i did tried to change the jquery files to older ones, or declare the iggrid component inside a table or div element.

when changing the jquery files to older ones, there was always some kind of problem, like a combo box that didnt load..

i also tried to declare the grid inside a div or table element...following this toppic:

http://es.infragistics.com/community/forums/p/76295/385579.aspx#385579

and according to this topic i should declare the iggrid component inside a table tag..

or if i want to use the div, i should change the call, acording to this link below..

 http://help.infragistics.com/Help/NetAdvantage/jQuery/2012.2/CLR4.0/html/Known_Issues_and_Limitations_2012_Volume_2.html#_Ref321736823


on my view i initialy had this: 

@inherits WebViewPage
@using Infragistics.Web.Mvc;
@{
Layout = "~/Areas/Idonic/Views/Shared/_Layout.cshtml";
}

 @(Html.Infragistics().Grid(Model))

and then on a button click i call this 

$("hierarchicalGrid").igGridUpdating("addRow", { var1: var1, var2: var2 });
$("hierarchicalGrid").igGrid("commit");

after reading some toppics i change the view to this

@inherits WebViewPage
@using Infragistics.Web.Mvc;
@{
Layout = "~/Areas/Idonic/Views/Shared/_Layout.cshtml";
}



@(Html.Infragistics().Grid(Model))

i also tried with the code above and remove the td and tr elements..

@(Html.Infragistics().Grid(Model))

i also change the table to a div element and give it and id...


@(Html.Infragistics().Grid(Model))

and to add a row on button click i call this method

$("#grid1").igGrid("widget").igGridUpdating("addRow", { NomeEmpresa: sNomeDaEmpresa, Nif: sNif, Tipo: sNivelDeAcesso });
$("#grid1").igGrid("widget").igHierarchicalGrid("commit");

http://igniteui.com/grid/editing-api-events -> this example use the same js and css files dependencies and this works, i think that the problem is related to the fact that i am using ighierarchicalgrid with load on demand??

but still the error appears, what could be the issue.?

Parents Reply Children