cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Disable iBrowser object

Former Member
0 Likes
250

Is there a method available to disable an iBrowser object(drop-down) on some event say - row selection on a grid?

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Likes

All:

Appreciate your responses. Thanks for your inputs.

Regards

Former Member
0 Likes

There's an "undocumented" method that you can try (via Javascript):

document.YourBrowserObject.getBrowserObject().getTreeObject().setEnabled(false);

This should work in tree mode, list mode, or drop-down list mode, but I haven't tried it.

- Rick

Former Member
0 Likes

Hi Srini,

For this thing you need to create html drop-down menu and add the items by fetching the data using iCommand Applet. On selection of your grid you can disable the html dropdown menu.

Thanks,

Rajesh.

Former Member
0 Likes

Here is some code to build an HTML select from an iGrid.


//------------------------------------------------
//	builds an HTML select object from data in an 
//		iGrid
//	- form: the form containing the select object.
//	- select: the name of the select object.
//	- applet: the name of the iGrid.
//	- displayColumn: the column number containing 
//		information to be displayed in the select.
//	- valueColumn: the column number containing 
//		information to be set as the value in the 
//		select.
//	- maxSize: for a multi-select, the max size of 
//		the element.
//------------------------------------------------
function buildHtmlSelectFromGrid(form, select, applet, displayColumn, 
			valueColumn, maxSize) {

	var grid = applet.getGridObject();

	for (var i=1; i<=grid.getRowCount(); i++) {
		select.options<i> = new Option(grid.getCellValue(i,displayColumn), 
				grid.getCellValue(i,valueColumn));
	}

	//	remove blank option
	select.options[0] = null;

	// set size of multiple select HTML element
	if (grid.getRowCount() <= maxSize) {
		select.size = grid.getRowCount();
	} else {
		select.size = maxSize;
	}
}

Former Member
0 Likes

Hi srinivasan,

I dont think there is any method by which u can disable certain items in ur drop-down list, but u can write a javascript code using this method: <b>void removeItem(String strItemtoBeRemoved</b> to remove certain items from the list wen an event occurs to serve ur purpose.

thanks,

Sushma.