Hi, i have this problem:
DEFINITION edatagrid jscript:
$(function() {
$('#dg').edatagrid({
url: 'get.php',
saveUrl: 'save.php',
updateUrl: 'update.php',
destroyUrl: 'destroy.php?ID='+row.ARTICLE, <!-- not working :(
rowStyler: function(index, row) {
if (row.QTY > row.STOCK) {
return 'color:red;font-weight:bold;';
}
}
});
});HTML:
<table id="dg" title="Planner" style="width:1200px;height:530px"
toolbar="#toolbar" pagination="true" idField="ID" url="get.php"
iconCls="icon-save" rownumbers="true" fitColumns="true" singleSelect="true">
<thead>
<tr>
<th field="ARTICLE" width="30">Article</th>
<th field="DESCRIPTION" width="110">Description</th>
<th field="CLIENT" width="30">Client</th>
<th field="CATEGORY" width="30">Category</th>
<th field="A102" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A102</th>
<th field="A104" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A104</th>
<th field="A105" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A105</th>
<th field="A109" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A106</th>
<th field="A110" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A110</th>
<th field="A111" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A111</th>
<th field="A116" width="15" editor="{type:'numberbox',options:{required:true}}" align="right">A116</th>
<th field="QTY" width="15" align="right">Total</th>
<th field="STOCK" width="15" align="right">Stock</th>
<th field="DIF" width="15" align="right" formatter="qtyNegative">Diferences</th>
</tr>
</thead>
</table>
<div id="toolbar" style="padding:5px;height:auto">
<div align="center">
<span>Article Code:</span>
<input id="articleid">
<span>Article:</span>
<input id="article">
<span>Client:</span>
<input id="clientid">
<span>Category:</span>
<input id="category">
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onClick="doSearch()">Do Filter</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-no" plain="true" onClick="clearSearch()">Clear Filter</a>
</div>
<div style="margin-bottom:5px" align="right">
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onClick="javascript:$('#dg').edatagrid('destroyRow')">Delete Row</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true" onClick="javascript:$('#dg').edatagrid('saveRow')">Save Row Changes</a>
<a href="#" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onClick="javascript:$('#dg').edatagrid('cancelRow')">Cancel Edition</a>
</div>
</div>
DELETE SERVER CODE:
<?php
$id = $_REQUEST['ID'];
include 'conn.php';
$sql = "DELETE PUTBLPLANNER WHERE ARTICLE=$id";
@mysql_query($sql);
echo json_encode(array('success'=>true));
?>
I traced the query and ID comes in blank: "DELETE PUTBLPLANEADOR WHERE ARTICLE="
I'm doing something wrong?
By the way, I traced save and update, and nothing happens. Get Rows and Search (only textboxes not combos and lists) works fine to me.
Please, if someone checks the code, really appreciate it.