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
calling of dataInit and dataEvents after the control are placed on the page
05/09/2012
13:17
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hallo Tony,

I tought about the problem which I described here many time, but I forgot to write the suggestion as the feature request.

The problem is following. The current implementation of jqGrid call dataInit and dataEvents directly after creating the corresponding control and before the control are placed on the HTML page as the child of the corresponding cell. One has many problems as the consequence of the method. As the result one have to place frequently the code of dataInit inside of setTimeout which is not nice.

I can describe the problem on the following example. One have for example textarea control (edittype: 'textarea') and uses the inline editing. In the case jqGrid do the following:

  1. inside of inline editing module it calls $.jgrid.createEl (see the line)
  2. inside of grid.common.js module it creates textarea control with document.createElement("textarea") (see the line)
  3. after that inside of grid.common.js module it makes some initializations of the control (see the lines) inclusive calling of internal setAttributes function.
  4. then one calls internal bindEv function which calls dataInit and dataEvents (see the line)
  5. after that some additional attributes will be set on the control (see the line for example)
  6. Then (inside of inline editing module) it adds "editable" class to the cell (see the line)
  7. inside of inline editing it places the textarea control on the HTML page with $(this).append(elc); (see the line)

I find that it would be very good to make internal bindEv function accessible per $.jgrid.bindEv and move the call of bindEv from $.jgrid.createEl to the corresponding editing module. In the above example one could call $.jgrid.bindEv at the end of all described above steps.

After such changes the code of many implementations of dataInit could be run without usage of tricks like setTimeout.

Alternatively one could consider to call $.jgrid.bindEv event more later after all controls in the editing row will be placed on the page.

Best regards
Oleg 

10/09/2012
19:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Thanks Oleg,

This a good recommendation actaully. Will do it later this week.

Thanks

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.

07/11/2012
10:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello Oleg,

I have made the changes in GitHub. I need to perform moree deep tests, but for now it is ok.

Thanks.

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.

07/11/2012
13:25
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

It's very good news! Thank you! I will test the code later. If I would find a problem I will post it you.

Best regards
Oleg 

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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