Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Search (advanced + normal) is not working in second instance of a jqGrid
22/03/2011
00:01
Avatar
JKnippschild
New Member
Members
Forum Posts: 1
Member Since:
21/03/2011
sp_UserOfflineSmall Offline

Hello,

First I must ask for forgiveness about the vagueness of specific details, code and the obscuring of certain parts in the attached screenshot. I'm under a CDA for this project as well as under restrictions from HIPAA.. so in the interest of privacy for patients and medical entities, I must be vague. Also, due to the fact this is in development, to avoid competition issues, I must also obscure branding and product names.

Now the problem I'm having:

I have a jqGrid that lists all sites attached to a particular drug study. When you click on a row it brings up a jQueryUI modal .dialog() with tabs. On one of the tabs is a second jqGrid instance that lists all subjects under that site. (Relationship Hierarchy is Study->Site->Subject). The grids both come from an object that is iterated and added with .jqGrid('addRowData',....);

The problem I just discovered is that when I enable the search button for the second jqGrid's pager, the input field where you input the search criteria does not accept any text or even allow me to place a cursor in the field. It allows me to select a field to search against, and it does properly list all the fields for the second jqGrid.

The search feature works perfectly on the first instance, which makes me think there is some sort of collision between the two instances. Please note that I am not using any custom search function for either instance.

Here is the instantiation call for the site list, called within a $(document).ready() function

        $("#patientList").jqGrid(
            {
                datatype: "local",
                width: 700,
                height:330,
                pager: '#patientPager',
                viewrecords: true,
                rowNum: 15,
                colNames: ['-REDACTED-', 'Patient #', 'Initials', 'Gender', "Date of Birth", '-REDACTED-', "CRF", 'SAE', 'Mortality'],
                colModel: [
                                    {name:'-REDACTED-',index:'-REDACTED-', width:70, sorttype:"int", hidden: true},
                                    {name: 'ClientPatientNumber', index:'ClientPatientNumber', width: 70, sorttype:"text"},

                                    {name: 'initials', index:'initials', width: 40, sorttype:"text"},
                                    {name: 'Gender', index:'Gender', width: 40, sorttype:"text"},
                                    {name: 'DOB', index:'DOB', width: 65, sorttype:"date", datefmt: "M/d/Y"},
                                    {name: '-REDACTED-', index:'-REDACTED-', width: 45, sorttype:"text"},
                                    {name: 'CRF', index:'CRF', width: 35, sorttype:"text"},
                                    {name: 'isSAE', index:'isSAE', width: 35, sorttype:"text"},
                                    {name: 'isDeceased', index:'isDeceased', width: 45, sorttype:"text"}
                               ]
            }
        ).navGrid('#patientPager',{view:true, del:false, edit: false },
                                    {}, // use default settings for edit
                                    {}, // use default settings for add
                                    {},  // delete instead that del:false we need this
                                    {multipleSearch : true}, // enable the advanced searching
                                    {closeOnEscape:false} /* allow the view dialog to be closed when user press ESC key*/
                    );
        
    
        $("#siteList").jqGrid({
        caption: "Study Sites in <?php echo $currentUser->getProject(); ?>",
        datatype: "local",
        height: 400,
        pager: '#pager',
        rowNum: siteList.length,
        cloneToTop: true,
        //rowList:[10,20,30,40,50],
        colNames:['ID', 'Site #', 'Protocol #', 'Site Name', 'Total Subjects', '-REDACTED-', '-REDACTED-', 'SAE Subjects', 'Deceased Subjects' ],
        viewrecords: true,
        colModel:[
                        {name:'id',index:'id', width:70, sorttype:"int", hidden: true},
                        {name:'ClientSiteNum',index:'ClientSiteNum', width:55, sorttype:"text"},
                        {name:'Protocol#',index:'Protocol#', width:100, sorttype:"text"},
                        {name:'SiteName',index:'SiteName', width:160, sorttype:"text"},
                        {name:'TotalSubjects',index:'TotalSubjects', align: 'right', width:100, sorttype:"int"},
                        {name:'-REDACTED-',index:'-REDACTED-', align: 'right', width:100, sorttype:"int"},
                        {name:'-REDACTED-',index:'-REDACTED-', align: 'right',width:120, sorttype:"int"},
                        {name:'SAESubjects',index:'SAESubjects', width:110, align: 'right', sorttype:"int"},
                        {name:'DeceasedSubjects',index:'DeceasedSubjects', align: 'right', width:120, sorttype:"int"}
                      ],
        sortname: 'SiteName',
        sortorder: "asc",

        onSelectRow: function (ids) {
            populateInformationDialog(ids);
            $( "#siteInfoDialog" ).dialog( "option", "title", "Site Information for Site #"+$(this).jqGrid("getCell", ids, 'ClientSiteNum' ) +" - "+$(this).jqGrid("getCell", ids, 'SiteName' ));
            $("#siteInfoDialog").dialog("open");
        }
        });

This is my first time using in jqGrid but I can't figure out why it's happening. That said, it might be something extremely tiny and mundane that I overlooked, but it might also be a bug with jqGrid itself. I'd appreciate any feedback as my deadline for the entire product is coming up very soon, and the decision to use jqGrid was a last minute decision.

Here's a screenshot for some context, click to enlarge:

Image Enlarger

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information