Hi, this has to be an easy one, but I can't figure it out.
I have a grid, and other buttons or popup screens will make changes to the grid, so the updates are all done programatically. When I call
$("#igGrid").igGridUpdating('addRow', row);
the grid updates fine. But when I call
$("#igGrid").igGridUpdating('deleteRow', rowId);
the row goes italic and strikethrough. I just want the row to disappear. If other operations cause more additions and deletions I get lots of these strikethrough rows.
This grid DOES have autocommit=true, and its not bound to any server side object or anything. On another screen I've used :
$("#igGrid"+category).igGrid("widget").igGrid("dataBind");
to 'refresh' that grid, but in this case it produces an error :
Error: There was an error parsing the array data and applying the defined data schema: data is null
How do I get my grid to actually delete a row when I code 'deleteRow'?
Hello,
My best guess is that you are using autocommit: true but the option is autoCommit: true and it's an igGrid option. Please, add autoCommit: true to the list of igGrid options and see if the issue persists.
I hope this helps!
Best regards,
Stamen Stoychev
Unfortunately, no, I didn't mistype the option :
$("#igGrid").igGrid({
autoCommit : true,
primaryKey : "contactId",
scrollbars : true,
autoGenerateColumns: false,
. . . .
Anything else I can try?
Please review the attached sample and modify it so your issue reproduces on it, so I ca be able the investigate the source of it. I have noticed that you are using option scrollbars for the grid and there is no such option. Have you extended the grid control?
The 'Scrollbars' was left from a previous developer. I inherited this code never checked for extraneous options. I just removed it.
Thank you for the sample code. I found some interesting results with it.
First putting your table onto my page as-is and the script at the top of my JSP :
If I change ALL the buttons to be type='button' (so that the page isn't submitted and refreshed) :
I assume you didn't want the buttons to refresh the entire page. I just read that "A <button> element in a <form>, by default, behaves identically to that submit input above." so that's why my page is refreshed - this entire page is part of a struts2 form. Maybe that has something to do with it? Could you try your sample in a struts2 form and see what happens?
<button>
<form>
This is my page :
<script type="text/javascript">
*** your copied script ***
</script>
</head>
<body class="claro">
<s:set name="theme" value="'simple'" scope="page" />
<s:form action="data_act" method="post" id="data_form" name="data_form" enctype="multipart/form-data">
<hidden vars...>
<div id="mainContent" style="width:1000px;height:400px;border:none;">
*** down in the content, on a tab ***
Any other hints or samples?
Thank you.
CJ
Hello CJ,
struts2 and JSP are not supported technologies by Infragistics.
Please refer to the our supported environments section (http://es.infragistics.com/support/supported-environments)