|
Title: Two identical records in DataGrid Post by: mzeddd on November 19, 2012, 11:19:11 AM Hi,
How to protect DataGrid from multiple entries of one record? I have DataGrid where I have some data (loaded from PHP script). I add new record by colling the following code Code: $.post('getData.php?id='+id,But if I call this code more then once for the same "id" then I have duplicated lines in my datagrid. Is there any way to protect datagrid from multiple load of one record? PS: Yes, I know that I can check data before I insert it. But I wonder if datagrid itself could do this kind of job. Title: Re: Two identical records in DataGrid Post by: stworthy on November 20, 2012, 07:28:28 PM It is easy to extend a new method to prevent from inserting duplicate records.
Code: $.extend($.fn.datagrid.methods,{Now call 'insertUniqueRow' method to insert your records. Code: $.post('getData.php?id='+id,Title: Re: Two identical records in DataGrid Post by: tooletime on March 23, 2016, 08:06:34 AM this should be part of the build itself. this just saved me a ton of work!
Thank you!!!! |