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 disable celledit on a cell
02/09/2009
11:26
Avatar
Kris
Guest
Guests

Hello,

I am using cell edit and everything works great. However, I am trying to conditionally disable celledit using setCell method in the loadComplete event. It does not seem to work?

Please help

Kris

04/09/2009
04:47
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Do not understand. How you can disable cell edit with setCell? I think this is not possible.

Please, describe clear what you try to do and posting code is recommended.

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.

08/09/2009
18:26
Avatar
jpalac
Australia
Member
Members
Forum Posts: 38
Member Since:
19/08/2009
sp_UserOfflineSmall Offline

Hi,

I'm trying to do something similar. Basically 2 cells are dependant on each other, and when the value of cell 1 is changed to false, then cell 2 should be non editable (not the whole column, but just the cell in the same row), and if the value is changed back to true, cell2 should be editable again.

Another example would be cascading drop downs - if I change value of dropdown1, and it turns out that there are no corresponding values for dropdown2, then the dropdown2 cell should be non editable and it's value should be reset to an empty string.

Is this possible to achieve?

Regards,

Jo

10/09/2009
04:07
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

1. After saving the cell1 do setColProp to disable/enable editing in cell2

2. use dataEvents in editoptions to do this. - see docs

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.

14/09/2009
03:22
Avatar
jpalac
Australia
Member
Members
Forum Posts: 38
Member Since:
19/08/2009
sp_UserOfflineSmall Offline

Tony,

If I use setColProp to set editable:false then it disables the whole column for all the rows, where as I just want to disable the column for the current row - so at cell level and not column level.

How do I achieve that?

Thanks,

Jo

14/09/2009
23:05
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Currently is no ready for you way to do this, but this point me to include some condition to do this - by example if the cell has a class disable-edit it will be not editable.

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.

16/09/2009
15:05
Avatar
scottw512
Member
Members
Forum Posts: 9
Member Since:
16/09/2009
sp_UserOfflineSmall Offline

I have the same issue. If there is some kind of onRowEdit, I will try to use it to set the cell class to disable-edit.

24/09/2009
19:25
Avatar
Allan
Guest
Guests

I have the same issue.

if the cell has a class disable-edit it will be not editable.

This would be awesome!

29/09/2009
11:28
Avatar
tim
Guest
Guests

Any chance this will make it into 3.6 ?

Thanks,

tim

29/09/2009
11:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Yes it will be in 3.6 - not only for cellEdit, but for inline edit (row lock)

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.

29/09/2009
11:31
Avatar
tim
Guest
Guests

awesome!

thanks.

tim

17/10/2009
13:22
Avatar
tim
Guest
Guests

Hi Tony,

I tried adding "disable-edit" in v36 and it doesn't seem to be included ?

or am I implementing it wrong ? I have "disable-edit" added as a class, but it's still editiable....

http://www.blackstag.com/jqGri.....6-example1

Thanks,

tim

18/10/2009
12:02
Avatar
tim
Guest
Guests

Link was down -  up an running again.

Tim

19/10/2009
09:38
Avatar
ben
Member
Members
Forum Posts: 9
Member Since:
19/10/2009
sp_UserOfflineSmall Offline

jpalac said:

Hi,

I'm trying to do something similar. Basically 2 cells are dependant on each other, and when the value of cell 1 is changed to false, then cell 2 should be non editable (not the whole column, but just the cell in the same row), and if the value is changed back to true, cell2 should be editable again.

Another example would be cascading drop downs – if I change value of dropdown1, and it turns out that there are no corresponding values for dropdown2, then the dropdown2 cell should be non editable and it's value should be reset to an empty string.

Is this possible to achieve?

Regards,

Jo


If you're using cellEdit: true, why don't you implement this behavioral logic in the afterEditCell event?

Something along the lines of:

afterEditCell: function (rowID, cellname, value, iRow, iCol) {
  gridSelector = $(“#” + this.id);
  if (myCondition) {
    gridSelector.restoreCell(iRow, iCol);
  }
}

Just a suggestion.

Have a nice day :)

Ben

 

21/10/2009
05:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

The class was changed in development phase. The class tha can be used is:

1. for cell editing  - "not-editable-cell"

2. for inline edit - "not-editable-row"

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.

21/10/2009
17:38
Avatar
tim
Guest
Guests

tony said:

Hello,

The class was changed in development phase. The class tha can be used is:

1. for cell editing  – “not-editable-cell”

2. for inline edit – “not-editable-row”

Regards

Tony


Works like a charm. Thanks!

tim

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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