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);

}

}

}

}

}