Hi,
I am using infragistics hierarchical grid load on demand. It has a few editable columns including a dropdown and a checkbox. I want to check if the dropdown value is "something" then show the checkbox otherwise disable editing on that checkbox cell.
I have used the following code to highlight the checkbox when the dropdown value is "something" but I am not able to disable editing in case it is not the desired value:
$(document).delegate("#igGrid", "igcomboselectionchanged", function (evt, ui) {
if (ui.items.length > 0) {
if (ui.items[0].data.Text == "something") {
$.ig.checkboxMarkupClasses = "ui-state-default ui-corner-all ui-igcheckbox-large !important";
}
else {
//want to disable check box here
$.ig.checkboxMarkupClasses = "";
});
Can you please help me with this?
Regards
S Singh
Hello Singh,
If the combo is not represent as a template in your grid, then you may try to use some of the Updaitng events, like for example editCellEnding or editRowEnding. These events give you information about the currently edited column and its value and corresponding row id. By checking the combo editor value you may disable the event proceeding for the checkbox column.
Please let me know if you have further questions about this.
Regards,
Tsanna
Hi Tsanna,
Thanks for your email.
Can you please give me little more information? If I use editCellEnding, I am able to access the rowId and combo box value when it is changed but how am I going to get the cell in the same row which has the checkbox in it and which property should I set to disable the editing on the checkbox cell?
Singh
ui.editor will return a reference to the editor used for editing the column. You may use it for getting the checkbox and disable it.