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
setColProp on editable
03/04/2009
12:54
Avatar
qlogic5
Member
Members
Forum Posts: 6
Member Since:
02/04/2009
sp_UserOfflineSmall Offline

I have a subgrid with a grid.

In the parent grid I add three buttons to the end of the parent grid ...

 loadComplete: function(){
       ids = jQuery("#grid").getDataIDs();
       for(var i=0;i<ids.length;i++){
           var cl = ids[i];
           be = "<input class='smallinput' type='button' value='Edit' onclick=jQuery('#grid').editRow("+cl+"); /> ";
           se = "<input class='smallinput' type='button' value='Save' onclick=jQuery('#grid').saveRow("+cl+"); /> ";
           ce = "<input class='smallinput' type='button' value='Can'  onclick=jQuery('#grid').restoreRow("+cl+"); />";
           jQuery("#grid").setRowData(ids[i],{actions:be+se+ce})
       }

In the subGridRowExpanded event i set the parent grid columns who have editable: true to false.

If the subGridRowColapsed event i set the parent grid columns who have editable:false to true. The point here is to disable anyone editing a parent grid row until they have completed with the sub grid.

All this works well, the only problem is the editRow, saveRow and restoreRow no longer trigger an inline ediit on the parent rows. Also if I do not expand the subgrid the inline editing works.

Is there a better approach than editable:false on the parent columns, for example: disable the editRow, saveRow and restoreRow buttons!

any ideas?

07/04/2009
03:33
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Which version of jqGrid do you use? Try with the latest stable.

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/04/2009
16:21
Avatar
qlogic5
Member
Members
Forum Posts: 6
Member Since:
02/04/2009
sp_UserOfflineSmall Offline

Hi Tony,

I was using version is 3.4.2.

It appears in a subgrid inline edit by default users can select and perform an inline edit on any parent. Since you using jquery and provide events within the grid in the right places i was able to utilize jquery to disable parents buttons without much difficulty.

Thank you for viewing my post.

cheers

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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