Hi,
My requirement is: I have to make editing of grid disabled for some unauthorized user.
I have implement the same and it is working fine in google chrome.
However when i run the same in internet explorer version 10.0. (Rows are enabled).
Why the same code is not working for internet explorer version 10.0.
Below is sample code
{ name: 'Updating', editMode: measurementPickListGridEditMode, enableAddRow: measurementPickListGridEditMode == 'none' ? false : true, enableDeleteRow: measurementPickListGridEditMode == 'none' ? false : true,
}
var measurementPickListGridEditMode = "row";
$(".measurementPickList").click(function () { //Disable edit for unauthorised user if ($("#hdfCanModifyMeasurementReferenceData").val() == "true") { measurementPickListGridEditMode = "row"; $('#btnSavePickList').prop('disabled', false); } else { measurementPickListGridEditMode = "none"; $('#btnSavePickList').prop('disabled', true); } });
Please let me know why the same code is not working for internet explorer browser version(10.0).
Thanks
Poonam
8698874810
Hello Poonam,
Thank you for contacting Infargistics Developer Support!
This approach is not going to work on any other browsers not only in IE 10.
Poonam Chauhan said: { name: 'Updating', editMode: measurementPickListGridEditMode, enableAddRow: measurementPickListGridEditMode == 'none' ? false : true, enableDeleteRow: measurementPickListGridEditMode == 'none' ? false : true, }
{ name: 'Updating', editMode: measurementPickListGridEditMode, enableAddRow: measurementPickListGridEditMode == 'none' ? false : true, enableDeleteRow: measurementPickListGridEditMode == 'none' ? false : true, }
This is the constructor of the Updating feature. Basically the constructors are used to specify values initially. (Refer to the following article http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29) In other words Updating feature object will not be notified about this change. The correct approach to make change to those options is to use the editMode setter , enableAddRow setter, and enableDeleteRow setter.
$(".measurementPickList").click(function() { //Disable edit for unauthorised user if ($("#hdfCanModifyMeasurementReferenceData").val() == "true") { measurementPickListGridEditMode = "row"; $('#btnSavePickList').prop('disabled', false); } else { measurementPickListGridEditMode = "none"; $('#btnSavePickList').prop('disabled', true); } $("#grid").igGridUpdating("option", "editMode", measurementPickListGridEditMode); $("#grid").igGridUpdating("option", "enableAddRow", measurementPickListGridEditMode); $("#grid").igGridUpdating("option", "enableDeleteRow", measurementPickListGridEditMode); });
Do not hesitate to contact me if you need further assistance.
Hello,
I am still following this. Have you been able to resolve the issue?If you have any concerns or questions, please feel free to contact me, I will be glad to help you.Thank you for choosing Infragistics components!