:: Forum >> Version 2 >>

Selecting a row

I have read every single topic on this so please don't tell me to go searching.

I am trying to just select a row, one row, and highlight it, both programmatically and by user.

I've tried adding styles to the .css I created for my grid, to the css included with ActiveWidgets to change the background color of the selected row, all i can change is the background color of the selected cell.

I think I'm moving the selected row, but it's hard to tell. There seems to be multiple versions of the grid and certain commands I'm seeing just give me an error in Javascript. I'm using

objGrid.setRowSelected(CurrentRowPosition);

to set the position and it seems OK, although I can't tell that the row has changed because the color doesn't change. I know it can be done because I saw it in a demo on a webpage, but I couldn't see or determine exactly what made the selected row color change.

I'm pretty sure I have the latest version of the code, I just downloaded it.

Thanks to anyone who can help,
Carol
Monday, June 26, 2006
OK, I got it, I have to have this:

table.request();
table.setRows("//NewDataSet/*");
objGrid.setCellModel(table);

objGrid.refresh();
// need this line
objGrid.setSelectionMode("single-row");

Then to programmatically set the rows, I need to do this:

objGrid.setSelectedRows([CurrentRowPosition]);

whatever the current position is.

So that worked.

Awesome, on to the next thing.

Carol
Monday, June 26, 2006



This topic is archived.

Back to support forum

Forum search