Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
345
Editing of row is disabled in igrid in chrome, however row is enabled in internetexplorer 10.0 version
posted

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

Parents
  • 11095
    Offline posted

    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,	
    }
    

    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.

Reply Children
No Data