:: Forum >>

Grid problem: can't select rows with the mouse


I've got a problem with highlighting a row by clicking on it. When I use the following code to enter my data from a database into the grid, it works:

var myData = [
     ['data from database'],
['data from database'],

When I use the following code, I can't highlight a row by clicking on it! I have to use the keyboard instead:

var myData = [];
myData['rowID']= [
['data from database']

This is the rest of my code:

// create ActiveWidgets Grid javascript object
    var grid = new AW.UI.Grid;

    // provide cells and headers text
    // yes... this line is correct
    // define data formats
    var str = new AW.Formats.String;
    var num = new AW.Formats.Number;
    var dat = new AW.Formats.Date;

    grid.setCellFormat([str, str, str, str, dat, dat, str, str, str, str]);
    // set number of rows/columns (rowcount from database)

    // set headers width/height
    // set editable on/off
    // enable row selectors
     grid.setSelectorText(function(i){return this.getRowPosition(i)+1});
    // set row selection


// on click open record
    grid.onSelectedRowsChanged = function(row){
        nr = grid.getCellValue(1,row)

    grid.onControlClicked = function(event, row){
Friday, February 3, 2006
I found the problem, although I haven't a solution yet. The problem is that the rowID is not a number. Most of the times it is a string like: '95/015' or '94/O/111'. I need to maintain these rowID's, because I use a filter based on AJAX: I type a criterium, the request is send to an .asp page, the .asp page returns the unique record numbers that match the criterium. These unique numbers are the same as I set as rowID and are used to display the matching records with the obj.setRowIndices('...') command.

The filtering works great, but now I want to be able to select rows with my mouse! How to do this?
Friday, February 3, 2006

This topic is archived.

Back to support forum

Forum search