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
Custm forms and GridToForm problem
25/08/2008
16:29
Avatar
pako
Member
Members
Forum Posts: 33
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

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

26/08/2008
03:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

26/08/2008
14:02
Avatar
pako
Member
Members
Forum Posts: 33
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

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

27/08/2008
02:21
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

27/08/2008
04:58
Avatar
pako
Member
Members
Forum Posts: 33
Member Since:
06/06/2008
sp_UserOfflineSmall Offline

Hi Tonny,

Yo don't understand me. In the cell I advisedly truncated text and put a linkt in the same cell (with gridToForm method) to put whole (not truncated text into a form near the grid). Is it possible? Text is truncated by javascript not php.

Regards

Paul

27/08/2008
09:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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