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
Cancel cellEdit in beforeEditCell event...
04/02/2010
08:03
Avatar
nvraman83
Member
Members
Forum Posts: 3
Member Since:
04/02/2010
sp_UserOfflineSmall Offline

Hi,

I have a scenario like, on click of a cell, based on some condition I should make the cell editable or non editable.

Is there any way I can do this?

Thanks,

Venkat

09/07/2010
04:23
Avatar
glittle
Member
Members
Forum Posts: 31
Member Since:
23/01/2010
sp_UserOfflineSmall Offline

I would also like this.

I need to be able to cancel a cell edit event...  if one cell is being editted, then another is clicked, I have to save the first one and abort the second one... I can't let the 2nd cell go into edit mode while the first one is still saving, since the the 2nd cell may be changed in the 1st cell's save event.

So, I just need to be able to return false in one of the cell edit events that happen when a cell is clicked on.

09/07/2010
08:50
Avatar
nvraman83
Member
Members
Forum Posts: 3
Member Since:
04/02/2010
sp_UserOfflineSmall Offline

Hi,

There is a workaround for what you want.

Use the beforeCellEdit method to accomplish the requirement.

Implement this inside beforeCellEdit event of your jQgrid

Step1: Declare two variables, lastiRow & lastiCol

Step 2: use the saveCell method and save the old cell: 

jQuery("#gridId").saveCell(lastiRow, lastiCol);

Step2: assign the current iRow and iCol to lastiRow and lastICol

lastiCol=iCol; lastiRow=iRow;

So, whenever a cell is edited, we are saving the previously edited cell.  

Hope this helps

Thanks,

Venkat 

05/08/2010
13:40
Avatar
Toadcop
Member
Members
Forum Posts: 4
Member Since:
03/08/2010
sp_UserOfflineSmall Offline

unfortunaly this doesnt work. in my case for some weird reason saveCell does fail at all (crash the thread kind a...)

but yes it's logical but doesnt work...

05/08/2010
13:43
Avatar
nvraman83
Member
Members
Forum Posts: 3
Member Since:
04/02/2010
sp_UserOfflineSmall Offline

You can also try restoreCell instead of saveCell...

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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