Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    isc.clone .... not Working

    Hi Isomorphic,

    I am not able to use isc.clone in my application.

    When i use it to clone one single selected record in a TreeGrid, i get exception from the browser stating too much exception.
    This happens in IE and mozilla both.

    Please let me know the reason or work around for this.

    My Requirement is to add a new record to a treegrid which will be a child record to existing record which wil be currently selected. This new record is exactly same as the selected record except one column which is a date field.

    Please find the code below:
    Code:
    function fnAddStoreDetailsContinue(){   
    		var storeDetResultTree = StoreDetails_TreeGrid.data; 
    		var selectedRec = StoreDetails_TreeGrid.getSelectedRecord(); 
    		var newRec = isc.clone(selectedRec);  // it is failing at this point.
    		alert("Cloned object: "+ isc.echo(newRec));
    		
    		// remaining functionality not added
     	
    }

    #2
    Don't use clone() for this, clone is recursive and the nodes are interlinked into a tree, hence you are basically attempting to clone the entire tree and anything it points to. Instead, just copy the relevant properties - a simple way to do this is to iterate over the DataSource.getFieldNames() Array.

    Comment

    Working...
    X