Tips for resolving the messy appearance of the jqgrid column chooser layout

The columns list in jqgrid column chooser is showing up in a single column and getting truncated:

What can be done to solve this issue? This problem is happening in FireFox, Chrome, and IE. The page's definition is provided below.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="stylesheet" href="jquery-ui-1.8.12.custom.css" type="text/css" title="ui-theme" />
<link href="ui.jqgrid.css" rel="stylesheet" />
<link href="ui.multiselect.css" />
<link href="Site.css" rel="stylesheet" />
<script src="jquery-1.7.1.js" type="text/javascript"></script>
<script src="jquery-ui-git.js" type="text/javascript"></script>
<script src="jqgrid/plugins/ui.multiselect.js" type="text/javascript"></script>
<script src="jquery.contextmenu-fixed2.js" type="text/javascript"></script>
<script src="grid.locale-en.js" type="text/javascript"></script>
<script type="text/javascript" src="jquery.jqGrid.src-multiselect1-deleteandsortpatches.js"></script>
    <script src="json2.js" type="text/javascript"></script>
    <script src="erp.js" type="text/javascript"></script>

    <script type="text/javascript">
    var $grid = $("#grid");
    $(function() {
      "use strict";
      $grid.jqGrid({
    ...

    $grid.jqGrid('navButtonAdd', '#grid_toppager', {
        onClickButton: function () {
            $(this).jqGrid('columnChooser', {
            });
        }
    });

Answer №1

For a more successful demo utilizing the columnChooser feature, try removing the required ui.multiselect.css file and see how closely it aligns with your desired results.

Take a look at this demonstration for reference.

I suggest checking in Fiddler or Firebug to ensure that the ui.multiselect.css file is being loaded correctly in your project. You may need to replace the line

<link href="ui.multiselect.css" />

with the line

<link href="jqgrid/plugins/ui.multiselect.css" />

which corresponds to another line you are using

<script src="jqgrid/plugins/ui.multiselect.js" type="text/javascript"></script>

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

Modifying an array without altering the reference

Perhaps my approach is not quite right, so please provide feedback if necessary! Imagine having an Array that represents some valuable data. var initial = ['x', 'y']; var duplicate = initial; initial.push('z'); console.log(i ...

What is the time stamp format of 1651928421543667000?

Recently, I have encountered an issue with an API returning a timestamp as 1651928421543667000. Despite trying various PHP functions like strtotime(), datetime(), and strftime(), I am unable to find the correct format for it. Can anyone provide some guid ...

Increasing the values of jQuery variables

I've written this code to assign different ids to variables, as demonstrated below: var numgrid = jQuery('.panel-grid').length; for (var i = 0; i < numgrid; i++) { var currentId = "#pg-"+id+"-"+i; if (jQuery(currentId)[0]) ...

Finding nearby locations on Google Maps by entering specific latitude and longitude coordinates

I'm currently designing a website that compiles all of the take away restaurants in the area. I've implemented a feature that allows these restaurants to mark their locations on Google Maps, saving their latitude and longitude data in our databas ...

How to calculate the difference in months between two dates using JavaScript

Is there a way to calculate the number of months between two dates taking into account specific conditions, such as when the dates are not exact and may have different day counts? Here is an example using the moment library: var date1 = moment('202 ...

javascript strange behavior

I am facing an issue with my code that is attempting to display images based on their height. Strangely, the code seems to work fine when I test it with 2 images, but fails when trying with 3 or more. Check out the site: Upon clicking a menu button, the ...

Process JSON data from an input using Javascript

I am encountering an obstacle at the final step of my data flow process. Currently, I am in the midst of developing an application that retrieves input from an HTML form field and utilizes Ajax to fetch data relevant to the user's input. Allow me to e ...

Filtering data in a table using Vue.js on the client side

I am facing an issue with filtering a table containing student details retrieved from a database using v-for. I am attempting to filter the table based on a specific field value. To begin with, I have three input fields located above the table, each bound ...

When clicking to open the md-select on Angular Material 1.1.0, an unwanted [object object] is being appended

Every time I try to open the md-select input, an [object Object] (string) is added to the body tag. Click here to see the md-select input After clicking the md-select once, this is how the body looks ...

Ensure that the header stands out by creating a grey background for the rest

https://i.sstatic.net/XUCkS.png Is there a way to change the background color of this layout to grey, excluding the top bar and bottom footer? The layout is structured like this: <html> <head> <body> <div id="big_wrapper"> ...

"Erroneous path being displayed by .query() function

Currently, my function utilizes the query() method to display all tasks. The issue lies in it referring to users/tasks?status=completed. What I actually require is users/:user_id/tasks?status=completed. How can I go about solving this? var app = angular ...

Using jQuery, ensure that when one div slides down, any other div on the page slides up simultaneously

After creating a function to slide down different divs by clicking on various links, I encountered a small issue. When I click on the first link, it successfully slides down the corresponding div. However, if I then click on another link, it leaves the f ...

Convert your flexible designs into dynamic HTML with our Flex to HTML/A

Looking for a solution to transform Flex code into Html/Ajax code. Most of my Flex code includes datagrids, buttons, and text labels. ...

What is the best way to toggle between various modals, each with its own unique content, and also update the

I'm looking to toggle between different models and calculate the results in each form separately. I've been trying to avoid copying too many modal codes and came across a sample HERE, but it uses the same ID, so I'm stuck! If you click on ...

Organize intricate JavaScript Arrays

Similar Question: How to sort an array of javascript objects? I'm in the process of transitioning some of my older ActionScript 2.0 code to JavaScript. While most things are running smoothly, I've hit a roadblock when trying to numerically s ...

Ways to compare arrays and merge them into a single array with JavaScript

Here are two arrays of objects: Object 1: [ { "id":"30772", "posimage":"/b/l/blue-shirt_1_1.jpg", "position":"Position Chest", "tech":"Embroidery" }, { "id":"30772", "posimage":"/b/l/blue-shirt_1_1.j ...

Troubleshooting: Issue with append function not functioning properly after click event in Angular

I am struggling to implement a basic tooltip in AngularJS. Below is the HTML I have: <span class="afterme" ng-mouseover="showToolTip('this is something', $event)" ng-mouseleave="hideToolTip();"> <i class="glyphicon glyphicon-exclama ...

Passing variable as a value in a POST request to interact with PHP and MySQL

After retrieving a random row from a MySQL server using PHP, I am encountering an issue with transferring the ID correctly to update.php for user feedback. The updating process is not functioning as expected on the server. I need help identifying the error ...

Tips for retaining form inputs without the need for a submit event when the page is reloaded or refreshed

I have a form on a page with multiple text inputs In addition to the form, I have implemented Zend pagination to allow users to select results. However, when using Zend paginate, the user's form inputs are lost because it is not submitted. Since th ...

Looking to personalize the MUI - datatable's toolbar and place the pagination at the top?

I successfully managed to hide the toolbar icon, but I am struggling with positioning pagination from bottom to top. Additionally, I am attempting to add two buttons (reset and apply) in the view-Column toolbar without any success in customizing the class. ...