Forum


Hi Tonny, I', trying to do something like this: In each row I want to have a link and that link should display after cliking on it, value of each column in form () something like in demo page (custom button and forms). The code which don't work is here:
afterInsertRow: function(rowid, rdata)
{
if(rdata.tresc.length > 20)
{
rdata.tresc = rdata.tresc.substring(0, 20);
rdata.tresc = rdata.tresc.replace(/\\w+$/, '');
var gsr = jQuery("#list").getGridParam('rowid');
if(gsr)
{
rdata.tresc += '(...)<a href="#" onclick="jQuery("#list").GridToForm(gsr,"#sendPM");" id="more">more</a>';
}
jQuery("#list").setCell(rowid,'tresc',rdata.tresc,{})
}
},
This, will truncate one column. and display a link, but this link don't work.How to to that after clicking all content of some row display in form (with non-truncated text in one column)? A appreciate for any help.
paul
03:30

Moderators
30/10/2007

You code will never be lunched, since of this
var gsr = jQuery(”#list”).getGridParam('rowid');
First we do not have parameter rowid in options array.
Remove the if(gsr) condition and all will work
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.
Thank you very much Tony, it works but in the textarea will appear something like this
<textarea>
Some truncated content (...)<a href="#" onclick="jQuery('#list').GridToForm(1,'#sendPM');" id="more">więcej</a>
</textarea>
but how to do that in the textarea will appear whole text (before truncated) ) Is it possible?
Regards
Paul
02:21

Moderators
30/10/2007

If you want to display the whole text in the cell you should modify the grid CSS.
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.
09:08

Moderators
30/10/2007

Hi,
I think you should check you script. You get only the first 20 characters -
what about the remaining one
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.
Most Users Ever Online: 715
Currently Online:
77 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