Forum
13:17
10/08/2009
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:
- inside of inline editing module it calls $.jgrid.createEl (see the line)
- inside of grid.common.js module it creates textarea control with document.createElement("textarea") (see the line)
- after that inside of grid.common.js module it makes some initializations of the control (see the lines) inclusive calling of internal setAttributes function.
- then one calls internal bindEv function which calls dataInit and dataEvents (see the line)
- after that some additional attributes will be set on the control (see the line for example)
- Then (inside of inline editing module) it adds "editable" class to the cell (see the line)
- 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
19:19
Moderators
30/10/2007
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.
10:56
Moderators
30/10/2007
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.
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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66