Ways to eliminate the yellow highlighting on a row

In my current application, I am incorporating jqGrid and aiming to apply custom styling to it. To start, my objective is to eliminate the yellow highlighting effect that appears when clicking on a row in the jqGrid css. Despite my attempts, I have been unable to locate the specific setting responsible for this. If anyone has a solution to disable this highlighting feature, kindly share your insights. Additionally, please specify the exact css file where I should make this modification.

Answer №1

To enhance your jqGrid setup, it is recommended to incorporate this code into your parameters instead of modifying the css

beforeSelectRow: function(rowid, e) {
    return false;
},

Answer №2

To customize the appearance of your elements after loading the jquery.ui.css file, include the following CSS code:

.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight
{
    border: 1px solid blue !important; // Updated border color
    background: none !important; // Updated background color
    color: white !important; // Updated text color
}

Answer №3

To make changes to the styling, locate the jquery-ui.css file and find the ui-state-highlight class for editing purposes. Best of luck with your modifications.

Answer №4

Imagine we have two class names: "holdRow" for a blue background and "HighlightHoldRow" for a yellow background. By utilizing the code below, the method "RowSelect" is called when a row is selected.

Here is the code snippet:

.holdRow td {
font-weight : bold !important;
color: Blue !important;
}

.higLightholdRow td {
font-weight : bold !important;
color: Yellow !important;

}

var LastRowId = "";
function RowSelect(id) {
if (Flag == "TRUE") {
var grid = $('#gvName);
if (LastRowId != "" && LastRowId != undefined && LastRowId != id) {
tr = grid[0].rows.namedItem(LastRowId);
$(tr).removeClass("higLightholdRow");
$(tr).addClass("holdRow");
LastRowId = "";
}
tr = grid[0].rows.namedItem(id);
$(tr).removeClass("holdRow");
$(tr).addClass("higLightholdRow");
LastRowId = id;

}

}

ClientSideEvents-RowSelect="RowSelect"

The RowSelect function is triggered when a row is selected. The selected row will have a yellow background color while the remaining rows will have a blue background color.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

jquery unclean data, in need of the jquery ui popup dialog

I have been experimenting with this library to determine if a form is dirty. By default, it triggers the standard browser confirmation asking whether you are certain about navigating away from the page. The jquery dirtyforms website includes a section sugg ...

Obtain the value of a dynamically selected option

I am facing an issue with my select options where I want the input field to be automatically filled with the 'data-place' value of the selected option whenever it changes. This includes a few dynamic select options. $(function() { // Hand ...

Error message: "Unassigned value in knockout.js"

Here is my code snippet for binding to a textbox: var CategoryViewModel = { categoryModel: ko.observable({ categoryId: ko.observable(), categoryName: ko.observable(), active: ko.observable() }), GetCategoryById: functio ...

Utilizing date ranges to filter datatables

Incorporating the AdminLTE template into my project has been seamless, especially with its standardized table format. I'm facing an issue where adding a daterangepicker to my HTML file is causing some confusion on how to properly filter my datatables ...

Generate listview items containing anchor tags automatically

I am currently developing a web application using Jquery Mobile. After retrieving data from a webservice function, I am utilizing an ajax call to display this data on my webpage. $('[data-role=page]').on('pageshow', function () { var u ...

Is there a way to pause the execution of code and prompt for confirmation before continuing?

Typically, I utilize the following code snippet in the backend of my application to display a pop-up message to the user after a successful entry has been saved: ScriptManager.RegisterStartupScript(this, this.GetType(), "pop", "<script>alert('C ...

Organize results from MySql using php

Trying to retrieve table values from a MySQL database sorted has proven to be a challenge for me. While I am able to connect and update the table successfully, I struggle with displaying the messages in the HTML chat history sorted by time. Is there a mo ...

Make the inner div fill the entire width within a container of a fixed width

On my blog page, I am currently using the col-md-8 class. Inside this column, my content is displayed. However, I want to stretch a particular div to occupy the full width within the col-md-8. Here is the section of my code: https://i.stack.imgur.com/uPS5 ...

Is there a specific plugin that enables dynamic calculations within a django formset?

Looking for a solution: Is there a jQuery plugin available that can perform calculations for a Django formset? The form is dynamic, changing the ID of each field per row whenever the add button is clicked. ...

Automated updating of Google Map markers

I am looking for a way to continuously update the marker on my Google Map to reflect my current position every 15 seconds using Jquery. Can anyone provide guidance on how to achieve this? Here is my code snippet: var x=document.getElementById("message"); ...

Code written in JQuery functions correctly when executed within the console, yet encounters issues when located within the script tag or

I'm attempting to build an online drawing tool reminiscent of an Etch-A-Sketch by using a grid of div elements. However, I'm facing an issue where the code responsible for highlighting the boxes when the mouse hovers over them (using the mouseent ...

I am interested in displaying a tooltip when a button is hovered over

In my application, there is a button with the ID #download_setup. Currently, an AJAX call is triggered upon clicking this button. However, there are certain users for whom I need to prevent this AJAX download and instead display a tooltip saying "you don&a ...

Javascript window.scroll function malfunctioning in some browsers while running in localhost

Check out this codepen link where everything is working, but unfortunately not locally: https://codepen.io/LoudDesignStudios/pen/RwxPJKY <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> < ...

Cannot retrace steps in file tree using ../

My website has a file structure set up like this: css style.css other files... templates index.html other files... I am attempting to reference the style.css file from my index.html document. My initial attempt was to navigate back a directory u ...

Dynamic binding of CSS properties in AngularJS is a powerful feature that enables

I am attempting to dynamically bind the css property counter-reset in AngularJS. To see my efforts, check out this Fiddle link. Essentially, I aim to have the numbering of li elements begin with the number specified in the controller. Despite trying to us ...

Is there a way to implement a scrollbar within a DIV element?

I'm working on a webpage that includes several customized buttons within multiple DIVs. Take a look at this example on the fiddle. Since I have a lot of buttons, I need to find a way to add a scrollbar so users can easily navigate to the desired butt ...

Launching the JQuery Dialog with an ASP.NET Button?

On one of my web pages, there is a form with two textboxes (username and password) and a submit button. If a user's membership is set to expire within the next 30 days and they click the button, I want a JQuery dialog to appear. Inside this dialog, th ...

Display specific pages in a modal window upon loading the page

Recently, I developed a basic modal using jQuery. This modal accepts a URL and loads it via the ajax method, then displays the response HTML in a div designed as a modal box. It's pretty straightforward! The only issue is that these pages are actual ...

Ensuring a fixed table with vertical scrolling only, no horizontal scrolling, while scrolling in either direction

I'm working with an HTML fixed design that contains a center-aligned table with extensive data scrollable both vertically and horizontally. To address the issue of keeping column headers visible when scrolling vertically, I used jQuery's clone() ...

css Repaint the CSS by filtering out list items with odd indexes

Having a list of over 20 items, I utilized the :nth-child(2n+1) selector to alternate the background color (even item in black, odd item in white). However, when using the jQuery Isotope plugin to filter out specific items by adding a .isotope-hidden class ...