:: Forum >> Version 1 >>

Highlighting myGrid.setRowText

Hi,
I've used myGrid.setRowText to give me one frozen name field on a screen. This works quite well when scrolling etc but on highlighting a row you need to click on the row and clicking on the row heading has no effect. Therefore is it possible to:

1: When the row has been clicked and highlighted can the frozen name field become highlighted also??
2: When you click on the frozen field (i.e. name field) can this event highlight the row in question.

I hope you can help as you've done great work thus far.........
John Keogh
Friday, April 30, 2004
any update on this guys .... I'm in a bit of trouble without ????
thnks...
Friday, May 7, 2004
Hopefully this 'patch' will help:
//    create ActiveWidgets Grid javascript object
var obj = new Active.Controls.Grid;

//    modify template-model mappings
obj.getLeftTemplate = function(){
    var 
template this.defaultLeftTemplate();
    
template.setDataModel(this.getRowModel());
    
template.setItemsModel(this.getRowModel());
    return 
template;
};

//    rebuild selection/value methods
obj.defineSelectionPropertyArray("value"0);

var 
setSelectionValues obj.setSelectionValues;

//    include left/item refresh
obj.setSelectionValues = function(array){
    var 
icurrent this.getSelectionValues();
    
setSelectionValues.call(this, array);

    for (
i=0i<current.lengthi++) {
        
this.getRowTemplate(current[i]).refreshClasses();
        
this.getLeftTemplate().getItemTemplate(current[i]).refreshClasses();
    }

    for (
i=0i<array.lengthi++) {
        
this.getRowTemplate(array[i]).refreshClasses();
        
this.getLeftTemplate().getItemTemplate(array[i]).refreshClasses();
    }

    
this.action("selectionChanged");
};

//    row selection event
var selectRow = function(event){
    if (
event.shiftKey) {return this.action("selectRangeOfRows")}
    if (
event.ctrlKey) {return this.action("selectMultipleRows")}
    
this.action("selectRow");
};

//    assign to left/item
obj.getLeftTemplate().getItemTemplate().setEvent("onclick"selectRow);

//    then as usual
//    ...

//    write grid html to the page
document.write(obj);
 
Alex (ActiveWidgets)
Saturday, May 8, 2004
works like a dream......thanks
Monday, May 10, 2004
i have a simple table with onClick on each row. when the row is clicked it would display a different page on an iframe on same page. at the same time, i want the row to be highlighted when the user clicks another row the highlighted one should no longer be highlighted.
right now, when a user clicks the row it is highlighted but the highlight never vanish.

here's my code.. please help

<tr bgcolor=<?=$color?> class='regrow'
onClick="top.location.target='top_frame';
top.top_frame.location.href='gosearch.php?find=Find Acct&field=<?=$conttrack[1]?>&que=y';
this.bgColor='#09AAFF';"
onBlur="this.className='regrow'"
onMouseover="this.className='hlite';"
onMouseout="this.className='regrow';">
<td><?=$conttrack[0]?></td>
<td><?=$conttrack[1]?></td>
</tr>
lunch
Thursday, June 23, 2005
Here we are able to sort the Column that is a header and also ablt to highlight the row. Can we include a Link in the row header values?? If yes please tell me how to do it. On click of this I need to send a hidden id value to the next page
Denzil
Thursday, October 13, 2005



This topic is archived.

Back to support forum

Forum search