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
Problem caused by "#editmod"+currenttablename
07/07/2010
14:20
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

hi,

  var grid = jQuery("#" + currenttablename);

  grid.editGridRow(......

After I use the editGridRow() to show an edit dialog, when I close it,  the jqgrid will append a <DIV id ='editmod' +currenttablename > in to the jgrid.

I don't know what's this div's  usage, and  this will cause a problem when I try to print the jgrid.

The problem is happened when the jggrid's row include an edittype:textarea, it seem that in the <DIV id ='editmod'> it create an <TEXTAREA..... . That unforunetely config with the jquery.printElement.js, which is a print plugin, you could find it on the jquery web-site.

So I have to remove the <DIV id ='editmod'> to run print.

I don't found any problem after I removed the <DIV id ='editmod'. the jqgrid could show/load/edit data as usually.

Please tell me if it will cause any problem I don't know, if I just removed the <DIV id ='editmod'> created by the editGridRow().

yours,

Ivan

07/07/2010
14:49
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

I recommend you don't remove any divs which you find on the page. Instead of this you can use 

See an additional CSS with media="print" like

<style type="text/css" media="print"> #editmod { display:none } </style>

See http://stackoverflow.com/quest.....69#2962569 

Regards
Oleg 

07/07/2010
16:22
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

it's not about the media=print.

it's a confict with other jquery plugin in the <DIV id ='editmod'>.

So I want to know what will happen if i remove the <DIV id ='editmod'>.

yours,

Ivan

07/07/2010
18:20
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

You written that you want to print a grid. Aren't you? If you search for jquery.printElement.js (see http://github.com/erikzaadi/jQ.....Element.js) for the text editmod you will find nothing. So there are no conflicts between jquery.printElement.js and jqGrig, form editing. I not really understand why you need use any plugin to print your web page. What you really need is a CSS for the "print" media. It defines which elements and how should be displayed on the print media (what should be printed).

Removing of a a DIV with id = 'editmod' + gridid if you want to print a grid I find absolutely unlogical. It is like a suggestion to break windows if you want to go throuth the door of the hauses. Sorry.

Moreover I recommend you to read http://www.trirand.com/blog/?p.....id/#p18449 which it about the same problem.

13/07/2010
05:18
Avatar
ivanchain
Member
Members
Forum Posts: 55
Member Since:
11/03/2010
sp_UserOfflineSmall Offline

jquery.printElement.js use a textarea internally, so if the grid has a textarea edit type, it will create a textarea in the editmod code part, which will confilct with the jquery.printElement.js.

I Use the plugin to print, is because it's much more easier to print a element, like a div.  Of cause, we can use media=print + css to do everything. But plugin will help us to do it better.

yours,

Ivan

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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