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
conditional editCell
13/02/2009
09:05
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

I am looking for a way to prevent the editCell functionality from working depending on the value of a different column on that row.

I am looking for a quick suggestion on how the value can be access from line 65 in celledit.js.

I believe that if another condition could be added to the if statement that converts a cell to an input the conversion could be prevented. 

if ($t.p.colModel[iCol].editable === true && ed === true) {.....}

 I've tried $t.p.getCell(3,2) but it did not work from this code point.

as in:

if ($t.p.colModel[iCol].editable === true && ed === true && $t.p.getCell(3,2) === true) {.....}

Thanks,

RobGMiller..

13/02/2009
11:30
Avatar
RobGMiller
Member
Members
Forum Posts: 42
Member Since:
02/01/2009
sp_UserOfflineSmall Offline

After reading a suggestion in this forum, I tried to use beforeEditCell to detect the value of the conditionnal field. It will run a function that tests the conditionnal field and returns true or false. As follows:

var allowedit = true;

if ($.isFunction($t.p.beforeEditCell)) {

      allowedit = $t.p.beforeEditCell($t.rows[iRow].id, nm, tmp, iRow, iCol);

}

if (allowedit) {

      $(cc).html("").append(elc); ...............

}

The modifications are placed around line 85 in grid.celledit.js of version 3.4.
Can anyone see complications resulting from the change?
Thanks.
RobGMiller 
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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