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
Ampersand in Text field Breaks my grid
15/04/2010
00:35
Avatar
bhogsett
Cleveland, Ohio, USA
Member
Members
Forum Posts: 19
Member Since:
21/09/2009
sp_UserOfflineSmall Offline

I have been using jGrid for months.  Yesterday a user reported that the grid had gone haywire (rows not displayed, clicking on headers didn't show some rows,, would not sort in reverse chronological order).

I investigated and found that the user had a field with "The Golf & Country Club".  The ampersand was the problem.  If I replaced the & with and all was well.

The grid gets the information from a mysql database using php and xml.

So my question is how to allow amperands in text fields?

Thanks.

BillConfused

16/04/2010
18:23
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

I do not think that is a jqGrid problem. Check your code.

Especially for you I have update the demo so that some notes contain &

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.

16/04/2010
21:07
Avatar
bhogsett
Cleveland, Ohio, USA
Member
Members
Forum Posts: 19
Member Since:
21/09/2009
sp_UserOfflineSmall Offline

tony said:

Hello,

I do not think that is a jqGrid problem. Check your code.

Especially for you I have update the demo so that some notes contain &

Best Regards

Tony


Thanks Tony, I was hoping it was a JGrid issue since I knew you would solve the problem if it involved JGrid.

I'll look at my code.

Bill

13/01/2011
19:55
Avatar
ranjandg
New Member
Members
Forum Posts: 1
Member Since:
13/01/2011
sp_UserOfflineSmall Offline

Hey Tony,

Using IE8 (or 7).

In your demos for the inline or the dialog box editing, try entering A&B (or any text that does not have a space around the "&" char). Anything after the "&" char is not displayed (but the tooltip does shows the actual and full text).

The above works fine in Firefox though. Please advise.

Thanks.

-Ranjan

03/02/2011
23:45
Avatar
zonyl
New Member
Members
Forum Posts: 1
Member Since:
04/02/2011
sp_UserOfflineSmall Offline

ranjandg said:

Hey Tony,

Using IE8 (or 7).

In your demos for the inline or the dialog box editing, try entering A&B (or any text that does not have a space around the "&" char). Anything after the "&" char is not displayed (but the tooltip does shows the actual and full text).

The above works fine in Firefox though. Please advise.

Thanks.

-Ranjan


I just encountered the problem as well on IE8.  Firefox works though.

Thanks for your time!

10/02/2011
17:39
Avatar
ortizfabio
Member
Members
Forum Posts: 5
Member Since:
28/01/2011
sp_UserOfflineSmall Offline

add me to the count. I just found the error. Any work around?

10/02/2011
18:50
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

There is a option autoencode.

Regards

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.

28/02/2011
16:50
Avatar
ortizfabio
Member
Members
Forum Posts: 5
Member Since:
28/01/2011
sp_UserOfflineSmall Offline

tony said:

Hello,

There is a option autoencode.

Regards


Tony,

This works great for 99.99% of the people. It breaks for me because I am using the first td of each row to insert two icons

where the user can click and edit the row. Since the autoencode function works in every column including the first one my HTML code to show the icons is also autoencode and it shows as text as opposed to html, see below. If you could skip the first column it would probably work for 100% of users.

Thanks,

<td wrap="on" title="" role="gridcell" class="ui-state-default jqgrid-rownum" style="text-align: center;" aria-describedby="grid_rn" width="40px">
&lt;div id='div_edit_row_9832092'&gt;&lt;img class='editRowButton gat-button' id='edit_row_9832092'  src='images/edit.png' align='bottom' alt='Edit Row' onclick="editRowButtonClicked(this);" /&gt;&lt;img class='lastUpdateButton gat-button' id='last_update_9832092'  src='images/icon_info_sml.gif' align='top' alt='Last update'" /&gt;&lt;/div&gt;
</td>

28/02/2011
18:55
Avatar
Steffan
Member
Members
Forum Posts: 50
Member Since:
18/08/2008
sp_UserOfflineSmall Offline

As a temporary work around, do you have a way of html encoding your text server side before sending it to the grid?

28/02/2011
19:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

No need to do this server side. There is a more elegant solution.

Define a custom formatter for that column which will return the value.

The autoencode does not apply to columns that have a custom formatter.

Kind 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:
38 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