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
20
enable/disable webcombo on client using javascript
posted

i am using NetAdvantage Web 7.2

I want to be able to do something like the following combo.setEnabled(false); or combo.setEnabled(true); i have the following function...

function SetWebComboSelectedItemID(webComboId, key, value)

{

// get the combo from the passed-in id

var combo = igcmbo_getComboById(webComboId);

var grid = combo.getGrid();

var index = 0;var row;

 

if (value == -1)

{

combo.setSelectedIndex(-1);

}

else

{

for (index = 0; index < grid.Rows.length; index++)

{

row = grid.Rows.getRow(index);

 

if(isNaN(row.getCellFromKey(key).getValue()))

{

if (row.getCellFromKey(key).getValue().toUpperCase() == value.toUpperCase())

{

combo.setSelectedRow(row);

combo.setEnabled(
false);

}

}

else

{

if (row.getCellFromKey(key).getValue() == value)

{

combo.setSelectedRow(row);

}

}

}

}

}

Parents
  • 215
    posted

    I know it's been a while since you posted your issue.  I recently had this same problem and I created a post, but I did not receive any answers, so I contacted Infragistics support.  They responded with the following code which will allow enable / disable of the webcombo:

    igcmbo_getComboById("WebCombo1").Element.disabled=false

    Works like a charm.

Reply Children
No Data