collapsable row/group [message #988780] |
Mon, 03 December 2012 07:03 |
Chris F Messages: 4 Registered: October 2012 |
Junior Member |
|
|
So I'm trying to create a dynamic collpasable group/rows to kind of mimic the grouping/outlining in excel - in a web ui.
Using this example : birt-exchange.org/org/devshare/designing-birt-reports/1126-collapse-groups-client-side/
I like the example, it took me a while to implement, but it doesn't work in Firefox/Chrome. Only in IE. Even the default example, will only work in IE. Anything else shows all rows expanded with a [-] and will not collapse onclick.
I'm using 4.2.1 currently.
I tried modifying the js some to use the visibility css tag but it didn't seem to make a difference.
<form>
<script>
function hidetable(form, ord, rwcnt){
//alert( document.getElementById(ord).style.display );
var hide = false;
var btnstr = "mybutton"+ord;
if( document.getElementById(ord).style.display == 'block' || document.getElementById(ord).style.display == ""){
document.getElementById(ord).style.display = 'none';
document.getElementById(ord).style.visibility = 'hidden';
document.getElementById(btnstr).value = "+";
//form.btnstr.value = "+";
hide = true;
}else{
document.getElementById(ord).style.display = 'block';
document.getElementById(ord).style.visibility="visible";
document.getElementById(btnstr).value = "-";
//form.btnstr.value = "-";
hide = false;
}
for( i=0; i< rwcnt; i++ ){
var drow = ord+""+i;
if( document.getElementById(drow)){
if( hide ){
document.getElementById(drow).style.display = 'none';
document.getElementById(drow).style.visibility = 'hidden';
}else{
document.getElementById(drow).style.display = 'block';
document.getElementById(drow).style.visibility="visible";
}
}
}
}
</script>
<INPUT Type="BUTTON" name=<VALUE-OF>"mybutton"+row["property_id"]</VALUE-OF> Value="-" onClick='hidetable( this.form, <VALUE-OF>row["property_id"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> )'></INPUT> <VALUE-OF>row["property_id"]</VALUE-OF>
<script>
hidetable( this.form, <VALUE-OF>row["property_id"]</VALUE-OF>, <VALUE-OF>row["Aggregation"]</VALUE-OF> );
</script>
</form>
Any suggestions?
Thanks!
|
|
|
|
Powered by
FUDForum. Page generated in 0.02343 seconds