Link to home
Start Free TrialLog in
Avatar of ambuli
ambuliFlag for United States of America

asked on

Selecting entire row in a table

Hi there,
I have a table created like below.  I want to be able to select one row( change the entire row to different color) and to be able to use the row data.   How can I do it?  thank you.
I want to be able to multi-select and create a list of row items that are selected.

       
 var __createAvailableResourcesTable = function(resources){
        var availableResourcesTable = document.createElement("table");
        availableResourcesTable.id = "AvailableResourcesTableID";
        
        resources.forEach(function(entry){
            var rowEntry = __createResourceRowEntry(entry);
            availableResourcesTable.appendChild(rowEntry);
        });
        return availableResourcesTable;
    };

        

Open in new window

Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Can you explain what you want to use the row data for - when you will use the data (is this part of creating the table - if not what triggers the process).

What criteria do you want to use to select a row (clicking on it for instance)

Please fill in the gaps.
Avatar of ambuli

ASKER

Thanks. The user click on a row to select the row data, the row will be used to populate another row in a similar table.  For example, I have two tables displayed side by side and the user selects an item from the first table and 'moves' that to the next table.  This is to be done by first user selects the rows from the first table and then clicking an arrow indicating the items to be moved to the next table.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ambuli

ASKER

Thank you!
You are welcome.