Forum
November 2nd, 2014
A
A
A
Topic RSS
Offline
Select Forum
New/Recently Updated Topics
New/Recently Updated Topics
TreeGrid
jqGrid Forum is moved

Help
jqGrid Forum is moved
Editing only one of the tables that are …
Filtring the JQGrid data while loading f…
Help needed ! Custom formatting groupTex…




The forums are currently locked and only available for read only access


beforeEditCell - can edit cell only once after it's locked
19/03/2013
14:55
14:55

denfer
New Member
Members
Forum Posts: 1
Member Since:
19/03/2013
19/03/2013

Hello,
I have implemented the below code to edit a cell based on another cell value.
it works only once and then the cell is locked.
I can't managed to solved the issue.
GridTemplate.Finance_List.defaults = {
caption: '',
sortname: null,
height: '470',
autowidth: true,
shrinkToFit: true,
multiselect: multi, //this add Checkbox in front of each row
cellEdit: true,
cellsubmit: 'clientArray',
rowNum: 20,
scrollOffset: 0,
postData:
{
OnlyPending: null
},
beforeEditCell: function (rowid, cellname, value, iRow, iCol)
{
//get Row data and check current Status
var rowData = jQuery(this).getRowData(rowid);
var CurrentStatus = rowData['Status'];
if (CurrentStatus != "Rejected")
{
editCell(iRow, iCol, false);
//jQuery(this).jqGrid('editRow', rowid, false);
jQuery(this).jqGrid("restoreCell", iRow, iCol);
}
},
caption: '',
sortname: null,
height: '470',
autowidth: true,
shrinkToFit: true,
multiselect: multi, //this add Checkbox in front of each row
cellEdit: true,
cellsubmit: 'clientArray',
rowNum: 20,
scrollOffset: 0,
postData:
{
OnlyPending: null
},
beforeEditCell: function (rowid, cellname, value, iRow, iCol)
{
//get Row data and check current Status
var rowData = jQuery(this).getRowData(rowid);
var CurrentStatus = rowData['Status'];
if (CurrentStatus != "Rejected")
{
editCell(iRow, iCol, false);
//jQuery(this).jqGrid('editRow', rowid, false);
jQuery(this).jqGrid("restoreCell", iRow, iCol);
}
},
I have only set editable one column that I want to edit
[GemDisplayName("Rejection<br/>Comment")]
[GridMetaData(GridPropertyName = "width", GridPropertyValue = "70")]
[GridMetaData(GridPropertyName = "align", GridPropertyValue = "left")]
[GridMetaData(GridPropertyName = "editable", GridPropertyValue = "true", GridPropertyValueType = GridPropertyValueTypes.TypeBool)]
[GridMetaData(GridPropertyName = "edittype", GridPropertyValue = "textarea")]
public string Finance_Rejection_Reason { get; set; }
[GridMetaData(GridPropertyName = "width", GridPropertyValue = "70")]
[GridMetaData(GridPropertyName = "align", GridPropertyValue = "left")]
[GridMetaData(GridPropertyName = "editable", GridPropertyValue = "true", GridPropertyValueType = GridPropertyValueTypes.TypeBool)]
[GridMetaData(GridPropertyName = "edittype", GridPropertyValue = "textarea")]
public string Finance_Rejection_Reason { get; set; }
any idea why I get this behaviour ?
Forum Timezone: Europe/Sofia
Most Users Ever Online: 715
Currently Online:
56 Guest(s)
Currently Browsing this Page:
2 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