• Rest Service - identifier

    By Lenin Belangonda 1 decade ago

    Hi

    I am using Rest service control from extension library to populate data to my dojo enhanced grid.  I have enabled dnd on the grid which works fine within the grid.  But when i move rows across grid the store gets corrupted (values are wiped out).  I think the issue with id item. So i tried the following

    in my grid declaration:

    plugins="{

    dnd: {

    setIdentifierForNewItem: setIdentifierForNewItem,

    dndConfig: {}

    }}">

     

    function setIdentifierForNewItem(item, store, index){

    var attrs = store.getIdentityAttributes(item);

    for(var i = attrs.length - 1; i >= 0; --i){

    item[attrs[i]] = index + (new Date()).getTime();

    }

    return item;

    }

     

    But this is not working. 

    Is there any way to define an item as identifier in the rest service control?

    Appreciate any help