jQWidgets Forums
Forum Replies Created
-
Author
-
June 17, 2014 at 7:10 pm in reply to: TreeGrid: Row specific editing TreeGrid: Row specific editing #55984
I figured out a way to do this. I was able to use the endUpdate within the cellBeginEdit function.
$(“#treeGrid”).on(‘cellBeginEdit’, function (event) {
var args = event.args;
// row key
var rowKey = args.key;
// row’s data.
var rowData = args.row;
// column’s data field.
var columnDataField = args.dataField;
// column’s display field.
var columnDisplayField = args.displayField;
// cell’s value.
var value = args.value;var isRowApprover = rowData.IsRowApprover;
if (!isRowApprover && (columnDataField == ‘StatusCode’ || columnDataField == ‘RejectionTypeID’)) {
$(“#treeGrid”).jqxTreeGrid(‘endUpdate’);
}
}
});June 17, 2014 at 6:10 pm in reply to: Dropdown List within TreeGrid using dataField and displayField Dropdown List within TreeGrid using dataField and displayField #55980Hi Peter
How should the object be formatted in order to populate the dropdown successfully.You mentioned to return json object.So I changed the getEditorValue function to return an object instead of the value, however this still will not work. How should the object be formatted within the getEditorValue function in order to populate the dropdown based on my above example. I tried a few different ways as shown below, but neither were successful.
getEditorValue: function (row, cellvalue, editor) {
//test 1
//var o = new Object()
//{
// value = editor.val();
// text = editor.text();
//}//test 2
var o = {
“value”: editor.val(),
“text”: editor.text()
};return o;
}June 17, 2014 at 5:26 pm in reply to: TreeGrid: Row specific editing TreeGrid: Row specific editing #55975Hi Peter
On one row it will be true , on another it row it will be false. I cannot just set the editable property to false as this would enforce false on each row. I need to evaluate on a row per row basis. I only want to dispable one cell one column in each row, not the entire row. That is why I wanted to use the cellBeginEdit function. You can do this with the jqxGrid but it the same does not apply to the treeGrid. is there any way I can do this in the TreeGrid?
Regards
RobbieJune 17, 2014 at 3:18 pm in reply to: TreeGrid: Row specific editing TreeGrid: Row specific editing #55966Hi Peter
Thanks for the quick response. The lock row function does not fit what I am looking for in this case. I want to disable only one column on a row per row level. I have a property in my data that is a boolean that is a hidden column in the grid. I want to check this value on each row to determine if one specific field is editable to the user. All the other columns should still be editable. Basically, if the user is assigned to the row, then the user can edit one specific column on the row. I tried to use the cellBeginEdit function to achieve this. I felt I could return false in this function to prevent editing of the column but it had no effect. Is there any way I could achieve this using the cellBeginEdit
$(“#” + this._ElementID).on(‘cellBeginEdit’, function (event) {
var args = event.args;
// row key
var rowKey = args.key;
// row’s data.
var rowData = args.row;
// column’s data field.
var columnDataField = args.dataField;
// column’s display field.
var columnDisplayField = args.displayField;
// cell’s value.
var value = args.value;var isRowApprover = rowData.IsRowApprover;
if (isRowApprover)
return true;
else {
return false;
}});
June 16, 2014 at 9:53 pm in reply to: TreeGrid: Row specific editing TreeGrid: Row specific editing #55923..The method of implementing this for the jqxGrid is in the below link. This cellbeginedit function is exactly what I would like to replicate using the jqxTreeGrid. I cannot seem to find any example of how this can be done in the Tree Grid documenation.
http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/disableeditingofrows.htm?web
Regards
Robbie -
AuthorPosts