Open In App
Related Articles

jQWidgets jqxGrid hiderowdetails() Method

Improve Article
Save Article
Like Article

jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxGrid is used to illustrate a jQuery widget that shows data in tabular form. Moreover, it renders full support for connecting with data, as well as paging, grouping, sorting, filtering and editing.

The hiderowdetails() method is used to hide the details of the specified row from the displayed jqxGrid. It has a parameter named rowBoundIndex, which is of type number. It does not returns anything.


$('#Selector').jqxGrid('hiderowdetails', rowBoundIndex);

Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.

<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery-1.11.1.min.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxdata.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxbuttons.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxscrollbar.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxmenu.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxgrid.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxgrid.selection.js”></script>

The below example illustrates the jqxGrid hiderowdetails() method in jQWidgets.



<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" href=
        "jqwidgets/styles/jqx.base.css" type="text/css" />
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript"
    <script type="text/javascript" 
    <script type="text/javascript" 
        <h1 style="color: green">
        <h3>jQWidgets jqxGrid hiderowdetails()
        <br />
        <div id="jqxg"></div>
            <input type="button" id="jqxBtn" 
                style="margin-top: 25px" value="Hide details" />
    <script type="text/javascript">
        $(document).ready(function () {
            var d = new Array();
            var subjectNames =
                ["C++", "Scala", "Java", "C", "R", "JavaScript"];
            var pageNumber =
                ["7", "8", "12", "11", "10", "19"];
            for (var j = 0; j < 7; j++) {
                var r = {};
                r["subjectnames"] =
                        Math.random() * subjectNames.length))
                r["pagenumber"] =
                        Math.random() * pageNumber.length))
                d[j] = r;
            var src = {
                localdata: d,
                datatype: "array",
            var inrow_details = function (index, parent_element) {
                var row_details = $($(parent_element).children(0));
                row_details.text("Info for: " + index);
            var data_Adapter = new $.jqx.dataAdapter(src);
                source: data_Adapter,
                height: "220px",
                width: "300px",
                rowdetails: true,
                initrowdetails: inrow_details,
                rowdetailstemplate: {
                    rowdetails: "<div style='margin-top: 12px;'></div>",
                    rowdetailsheight: 45
                ready: function () {
                    $("#jqxg").jqxGrid('showrowdetails', 2);
                columns: [
                        text: "Subject Name",
                        datafield: "subjectnames",
                        width: "120px",
                        text: "Page No.",
                        datafield: "pagenumber",
                        width: "140px",
                width: "180px",
                height: "30px",
            $("#jqxBtn").on("click", function () {
                $('#jqxg').jqxGrid('hiderowdetails', 2);



Last Updated : 30 Mar, 2023
Like Article
Save Article
Similar Reads
Related Tutorials