3.0 beta 2

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
April 30,
any update on this guys .... I'm in a bit of trouble without ????
thnks...
May 7,
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 i, current = this.getSelectionValues();
    setSelectionValues.call(this, array);

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

    for (i=0; i<array.length; i++) {
        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)
May 8,
works like a dream......thanks
May 10,
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
June 23,
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
October 13,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.