hi
I was looking for a way to expand a nested view (and collapse all the others) on client side
and since I couldn't find one, I've decided to post my own resolution
I'm using a little bit of jQuery so I could catch the expand button mouseover event
I was looking for a way to expand a nested view (and collapse all the others) on client side
and since I couldn't find one, I've decided to post my own resolution
I'm using a little bit of jQuery so I could catch the expand button mouseover event
<script type=
"text/javascript"
>
$(document).ready(
function
() {
//expand details row to show more data on a certain work
$(
".rgExpandCol"
).live(
"mouseover"
,
function
(event) {
var
masterTable = $find(
"<%= Grid1.ClientID %>"
).get_masterTableView();
//collapse all
for
(
var
i = 0; i < masterTable.get_dataItems().length; i++) {
masterTable.collapseItem(i);
}
//expend row
for
(
var
i = 0; i < masterTable.get_dataItems().length; i++) {
if
(masterTable.get_dataItems()[i].get_element() == $(
this
).parent()[0]) {
masterTable.expandItem(i);
break
;
}
}
});
});
</script>