I have a combo box in my grid that I am populating with a list of employees. I am having trouble accessing that data source in javascript. I have the following JavaScript but colSettings is empty. If you look at the screen shot I attached there should be 10 column settings in my grid and I should see the alert that I put in my code but I don't.
var comboDataSource = {}; var colSetting; var grid = $("#NewLocationsGrid"); var colSettings = $("#NewLocationsGrid").igGridUpdating("option", "columnSettings");
for (var i = 0; i < colSettings.length; i++) { alert(i); colSetting = colSettings[i]; }
Hello jake90210,
Thank you for posting in our community.
I created a small sample using combo editor provider in the igGrid. I have some additional column settings to make columns readOnly. In my sample there is also a button. When this button is clicked I am using your code to loop trough Updating column settings and on my side it works as expected. All column settings are available in the columnSettings collection.
$("#colSettingsBtn").click(function () { var colSettings = $("#grid1").igGridUpdating("option", "columnSettings"), colSetting; for (var i = 0; i < colSettings.length; i++) { alert(i); colSetting = colSettings[i]; } });
I am attaching my sample for your reference. Could you please test it on your side and let me know what is the result.
Is this is not an accurate demonstration of what you are trying to achieve please feel free to modify my sample in order top reproduce the issue and send it back to me along with steps to reproduce. This is going to be highly appreciated and will help me find the root cause for this matter.
Please feel free to continue sending updates to this case at any time