Forum


04:04

15/10/2009

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!!!
thanks
-Dean
10:15

Moderators
30/10/2007

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.
12:09

Moderators
30/10/2007

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.
08:13

15/10/2009

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
10:45

31/12/2009

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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66