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
30
igGrid - (de)activating "Add Row" - feature
posted

Hi!

I want to activate and deactivate the "Add Row" feature. For this I use the following code:

$('#dataGrid').igGridUpdating("option", "enableAddRow", false);

This works flawlessly, but when I call:

$('#dataGrid').igGridUpdating("option", "enableAddRow", true);

The "Add Row"-line in grid stays hidden, I can't add more lines.

Am I missing something here, or is there a workaround for this problem?

Thanks

  • 17590
    Verified Answer
    Offline posted

    Hello Stefan,

    I created a small sample where I am toggling the 'Add New Row' row using the same approach as you do, setting enableAddRow option.

    $("#btn1").click(function(){
    		var enableAddRowOption = $("#grid1").igGridUpdating("option", "enableAddRow");
    		if( enableAddRowOption){
    			$("#grid1").igGridUpdating("option", "enableAddRow", false);
    		} else{
    			$("#grid1").igGridUpdating("option", "enableAddRow", true);
    		}
    	});

    I am using latest version available for 18.1, 18.1.189 and on my side everything works as expected. Please test my sample on you your side and let me know how it behaves. If the issue is still reproducible, please provide me with steps to reproduce. If this is not an accurate demonstration of what you are trying to achieve please feel free to modify it and send it back to me.

    Looking forward to hearing from you.

    4382.igGridToggleAddRow.zip