function buildSortedCache(table){
			var totalRows, cache;
			totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
			cache = {row:[]};
		
			for (var i=0;i < totalRows; ++i) {
				var c = table.tBodies[0].rows[i];
				var descendantRow = [];
				if (isParent(c)) {
					var parentId = c.parentId;
					var totalDescendant = c.descendantCount;
					if (totalDescendant != 0) {
						var descendant = 0;
						for(var k=0; k<totalRows; k++){
							var b = table.tBodies[0].rows[k];
							if(isDescendant(b) && b.parent == parentId){
								descendantRow.push(k);
								descendant = descendant + 1;
							}
							if(! (descendant < totalDescendant)){
								break;
							}
						}
						c.descendantRow = descendantRow;
					}
				}
				cache.row.push($(c));
			};
			return cache;
		}
/* Record order of sorted list for children nodes */
Record order of sorted list for children nodes
Record order of sorted list for children nodes
function buildSortedCache(table){
			var totalRows, cache;
			totalRows = (table.tBodies[0] && table.tBodies[0].rows.length) || 0,
			cache = {row:[]};
			for (var i=0;i < totalRows; ++i) {
				var c = table.tBodies[0].rows[i];
				var descendantRow = [];
				if (isParent(c)) {
					var parentId = c.parentId;
					var totalDescendant = c.descendantCount;
					if (totalDescendant != 0) {
						var descendant = 0;
						for(var k=0; k<totalRows; k++){
							var b = table.tBodies[0].rows[k];
							if(isDescendant(b) && b.parent == parentId){
								descendantRow.push(k);
								descendant = descendant + 1;
							}
							if(! (descendant < totalDescendant)){
								break;
							}
						}
						c.descendantRow = descendantRow;
					}
				}
				cache.row.push($(c));
			};
			return cache;
		}
function buildSortedCache ( table ) { var totalRows , cache ; totalRows = ( table . tBodies [ 0 ] && table . tBodies [ 0 ] . rows . length ) || 0 , cache = { row : [ ] } ; for ( var i = 0 ; i < totalRows ; ++ i ) { var c = table . tBodies [ 0 ] . rows [ i ] ; var descendantRow = [ ] ; if ( isParent ( c ) ) { var parentId = c . parentId ; var totalDescendant = c . descendantCount ; if ( totalDescendant != 0 ) { var descendant = 0 ; for ( var k = 0 ; k < totalRows ; k ++ ) { var b = table . tBodies [ 0 ] . rows [ k ] ; if ( isDescendant ( b ) && b . parent == parentId ) { descendantRow . push ( k ) ; descendant = descendant + 1 ; } if ( ! ( descendant < totalDescendant ) ) { break ; } } c . descendantRow = descendantRow ; } } cache . row . push ( $ ( c ) ) ; } ; return cache ; }
Record order of sorted list for children nodes
Record order of sorted list for children nodes