Expand and Collapse on buttong click
- by kumar
Please this is not a duplicate thread do consider this one..thanks..
function loadAllAccounts() {
$('#Grid tr[role="row"] td a').each(function(row) {
if ($('#CGrid tr[role="row"] td.hasClass(sgcollapsed) a')) {
$(this).click();
}
else if ($('#Grid tr[role="row"] td.hasClass(sgexpanded) a')) {
return false;
}
});
}
First time the grid is loading with all the user data..at very firsst row each use can exapdn the grid to see subgird using + sign,, when use clicks + sign I am expanding the row to show subgrid,
above code is working at very frist time when I click expand button its expanding all the rows and collpase its colaapsing allt he rows perfectly,
but user open any row to see subgrid,, after clicking the expand button opened row will closing and closing rows will be opening.. exactly its doing opposite?
can anyone sujjest me what is this cause in the code?
thanks