Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8041977
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:24:40+00:00 2026-06-05T04:24:40+00:00

Trying to access the Selected row of a GridView by using JQuery to find

  • 0

Trying to access the Selected row of a GridView by using JQuery to find the row with the background-color attribute set to the SelectedRowStyle background color. That color is #FF6600. I’ve tried

var row = $("tr").find().css("background-color", "#FF6600");

But that just sets all the rows to orange.

var row = $("tr[background-color=#FF6600");

That returns empty

var row = $("tr").find().attr("background-color");

Returns undefined

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:24:42+00:00Added an answer on June 5, 2026 at 4:24 am

    Try the .filter method.

    var rows = $('tr').filter(function(){
        var color = $(this).css("background-color");
        return color === "#FF6600" || color === "rgb(255, 102, 0)" ;
    });
    

    I haven’t tested it, the rgb part may need to be adjusted to account for spacing.

    Edit:

    or better yet, this takes into account uppercase vs lowercase

    var rows = $('tr').filter(function(){
        var color = $(this).css("background-color").toLowerCase();
        return color === "#ff6600" || color === "rgb(255, 102, 0)" ;
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a code that displays an image selected using a
For my plugin I'm trying to access the selected code in a CompilationUnitEditor. Therefore
When trying to access data-onload using $(#index).data(onload) I get back 'undefined' : <script type=text/html>
I'm trying to access the value of a selected radioButton. I have a list
I am trying to access object using ajax in spring MVC. So its like
I am trying to make an app that opens android market page of selected
I am trying to get the selected card number that has logged in via
trying to retrieve the id column of records that have their checkboxes selected in
I have been trying to access a queue that is on the cloud while
I'm trying to set the selected value of a DropDownList which sits inside the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.