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
Multiselect: checkbox not checked when row clicked
11/10/2008
10:18
Avatar
donb
Member
Members
Forum Posts: 24
Member Since:
11/10/2008
sp_UserOfflineSmall Offline

I have to be doing something stupid.  No one else seems to have this problem.  jQuery 1.2.6 and jgGrid 3.3

see example: http://qindy.com/map/popup-lis.....e=rtb_list

Clicking the row doesn't check/uncheck the checkbox.  I determined that the checkbox id's are all 'jgq_' (no id appended to them). 

From the code it appears this id is created from the <tr> id, which I see set to the appropriate values for each row (using Firebug in Firefox to examine this).  They are the 'id' values I extract from my database and which are in the 'id' element of my JSON 'rows' element.

I've stepped through the grid.base.js and the id simply seems to be undefined when the checkbox id is created.  If I edit the id into them with Firebug, the checkbox works correctly.

And, here's one grid-row of data from my JSON response:

    "page": "1",
    "total": 1,
    "records": "322",
    "rows": [
        {
            "id": "376",
            "cell": [
                "2414-16 N Kitley Av<\\/span>",
                "VIEW<\\/a>",
                "2 Unit",
                "2br 1ba",
                "No",
                "$2,500.00",
                "$749.00",
                "$74,934.00",
                "Map<\\/a>"
            ]
        },

Been looking at this for hours and just don't see why this happens.

Don

11/10/2008
11:01
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

It is definitley a bug. It will be corrected.

Thank you

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/10/2008
11:09
Avatar
donb
Member
Members
Forum Posts: 24
Member Since:
11/10/2008
sp_UserOfflineSmall Offline

Can you explain?  The example at

 http://trirand.com/jqgrid/jqgrid.html 

works fine.

11/10/2008
11:37
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

In the example is set in the options multikey: false and this work -

i.e - in the code there should be some additional checking for this options

Thank you

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/10/2008
11:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

sorry multikey is true and not false

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/10/2008
11:51
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

But at all this is not the problem 🙂

The problem is that there is no id for the checkbox. I will look why?

P.S. This help me to find any other issue with this (My first post)

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/10/2008
11:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Here is it

The problem is - there is no id for the checkbox.

This happen only when using json data - i.e. the id is obtained after constructing the check box - must be before - It is fixed.

Alse the second bug , which actuall was first for me is fixed too.

Thank you

Reagrds

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/10/2008
14:54
Avatar
donb
Member
Members
Forum Posts: 24
Member Since:
11/10/2008
sp_UserOfflineSmall Offline

Excellent work Tony.   I look forward to getting the next version.

thank you,

Don

11/10/2008
16:35
Avatar
donb
Member
Members
Forum Posts: 24
Member Since:
11/10/2008
sp_UserOfflineSmall Offline

To all, until Tony makes another release, I offer the following workaround/fix:

in grid.base.js at line 740 (release version 3.3)

add: row.id = cur[idn];

See below for the relevant section of code I modified:

   if (drows) {
   for (var i=0;i<drows.length;i++) {
    cur = drows[i];
    row = document.createElement("tr");row.id = cur[idn];
    if(ts.p.multiselect){
     addMulti(t,row);
     gi = 1;
    }
    if (ts.p.subGrid) {
     try { $(ts).addSubGrid(t,row,gi);} catch (e){}
     si= 1;
    }

My change is in BOLD

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
72 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