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_Related Related Topics sp_TopicIcon
gridComplete
10/05/2010
23:16
Avatar
coden4fun
New Member
Members
Forum Posts: 1
Member Since:
10/05/2010
sp_UserOfflineSmall Offline

Hi, I'm trying to do a mouseover for the jquery and when the mouse is hovered over a certain row I can get the id from that row and populate information and display an image.  However, I have been having the hardest time trying to do so.

Here is what I want to happen

Just like in the onSelectRow where I obtain the data using the following code

var ret = $('#list').jqGrid('getRowData', Id);

I want to use when I do a mouseover.  However, I don't see a way of doing this.  I tried the following under gridComplete

gridComplete: function() {'.jqgrow').mouseover(function(e) {

var rowId = $('.jqgrow').parent(tr:first).attr('id');

alert("You rolled over " + rowId.Id);

});

}

but it only gave me the ide number of the row of that table inside the jqgrid and I need the data from that row instead.

For instance, in my data I have Id, FirstName, LastName, FullName, Title, SortID

I would like to present a picture on the right side of my HTML page when hovered over certain rows by passing the Id to the HTML page, and querying through an array.  If I can some how get the actual Id that's within my dataset I can do the rest.

Any help would be lovely.

I have given the entire code of my jqGrid at the bottom for reference.

jQuery("#list").jqGrid({

url:

'/Providers/DynamicGridData/',

datatype:

'json',

mtype:

'GET',

colNames: [

'Id', 'LastName', 'FirstName', 'FullName', 'Title', 'Url', 'SortId'],

colModel: [

{ name:

'Id', index: 'Id', width: 30, align: 'left', hidden: true },

{ name:

'LastName', index: 'LastName', width: 30, align: 'left', hidden: true },

{ name:

'FirstName', index: 'FirstName', width: 30, align: 'left', hidden: true },

{ name:

'FullName', index: 'FullName', width: 100, align: 'left' },

/*{ name: 'FirstName', index: 'FirstName', width: 100, align: 'left' },*/

{name:

'Title', index: 'Title', width: 200, align: 'left' },

{ name:

'Url', index: 'Url', width: 30, align: 'left', hidden: true },

{ name:

'SortId', index: 'SortId', width: 30, align: 'left', hidden: true}],

pager: jQuery(

'#pager'),

rowNum: 10,

rowList: [5, 10, 20, 50],

sortname:

'Id',

scrollOffset: 0,

width:

'425',

altRows:

'true',

altClass:

'ui-priority-secondary',

autowidth:

'true',

height:

'300',

altRows:

'true',

altClass:

'ui-priority-secondary',

viewrecords:

true,

caption:

'Clinical Providers',

onSelectRow:

function() {

var Id = $("#list").jqGrid('getGridParam', 'selrow');

if (Id) {

var ret = $('#list').jqGrid('getRowData', Id);

var url = ret.Url;

url.split(

' ').join('');

//alert("id=" + ret.Id + "FullName=" + ret.FullName + "...");

window.location =

"/" + url;

}

else { alert("Please select a row"); }

},

gridComplete:

function() {

$(

'.jqgrow').mouseover(function(e) {

var rowId = $('.jqgrow').

alert("You rolled over " + rowId.Id);

});

}

});

12/05/2010
13:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Try this

gridComplete: function() {

$('.jqgrow').mouseover(function(e) {

var rowId = $(this).attr('id');

alert("You rolled over " + rowId.Id);

});

}

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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