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
How to make a row linkable?
06/01/2010
04:04
Avatar
kikz4life
Philippines
Member
Members
Forum Posts: 14
Member Since:
15/10/2009
sp_UserOfflineSmall Offline

hi,

just started using jqgrid, previously i used flexigrid.

in flexigrid i can used this that a row is clickable and if click will be directed to its detailed information

i.e in flexigrid

{display: '<?=lang("username")?>', name : 'username', width : 100, align : 'left', process:viewHeader, sortable:true}

the process: viewHeader is an html page that will show the record of the username in a page

and this is jqgrid:

{name:'role_code',index:'role_code', width:80, editable:true, editrules: {required:true}},

does jqgrid have this functionality? also i've seen the added button for view file but i preferable like the row to be link in a new same window/page. Any response from the community will be a great help for me.

PS: data loading is much faster compared to flexigrid. really like this stuff!!! Cool

thanks

-Dean

06/01/2010
10:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks.

Maybe you should use a formatter link or better showLink where you can set the link for the desired page again with the

parameters what you want.

More you can find here:

http://www.trirand.com/jqgridw.....rmat_types

Please let me know if this is applicable for you.

Best 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.

06/01/2010
11:59
Avatar
kuafusoft
Member
Members
Forum Posts: 27
Member Since:
31/12/2009
sp_UserOfflineSmall Offline

Tony,

Sometimes we want to link to a javascript function, such as I met before: I want to edit the current row when I click a cell. It seems can not done by the link or showlink formatter.

Regards.

06/01/2010
12:09
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Sorry do not understand exact what you want.

Try to use onCellSelect event something like

onCellSelect : function(rowid, iCol, content, e ) {

if(iCol == 2 ) // This is the index of the column in colModel

{

// call here you javascript function

....

}

}

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.

07/01/2010
08:13
Avatar
kikz4life
Philippines
Member
Members
Forum Posts: 14
Member Since:
15/10/2009
sp_UserOfflineSmall Offline

hi tony,

i tried your suggested link for docu in formatter. uhmm., i like this part in the http://www.trirand.com/blog/jq.....grid.html# about formatter: 'link' bcoz it redirect me to a next page(close enough:)) but i dont want it to redirecting me to a next page/window.

{name:'user', index:'user', width:80, editable: true, formatter: 'link'},

What i would like to do is when i click the cell it will show me the details/information of that person in the same page but the jqgrid will be disable/hide. It's like just hiding the jq datagrid and will display the html page for the details. Am i clear? sorry for my messy explanation. 🙂

thanks again tony

07/01/2010
10:45
Avatar
kuafusoft
Member
Members
Forum Posts: 27
Member Since:
31/12/2009
sp_UserOfflineSmall Offline

Tony,

Thank you very much. I found a similar article:/blog/?page_id=393/discussion/selecting-row

I tried the onCellSelect Event, yes, it's almost good enough. But there's no underline to tell the user that it can be clicked and I hope that only when the user click the text, the edit or view form pop up.

Now I add a link after gridComplete event like “<a href=”javascript:grid_edit(gridId, rowId)”>aaaa</a>” for I can not get the rowId in custom format parameters. If I can get the gridId, I can do it with a custom formatter. How can I get the gridId just with jqgrid method?

I'm a fool!!

I can get the gridid:

gridId = $(this).attr('id');

right?

I'm wrong. in the custom formatter function, I can not get $(this).:(


Can we put the gridId in the opt in formatter function? I looked the source code, it seems I can do it in formatter function in grid.base.js, about line 394.

Thank you again.

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