Hi,
I'm trying to programmatically set the valuelist using javascript but I've ran into some problems. Here's my code:
var grid = document.getElementById('ctl00_ContentPlaceHolder1_UltraWebGrid1');
var ddlArrayContainer = new Array(2);
var ddlArrayItem1 = new Array('Driver', 'Driver');
var ddlArrayItem2 = new Array('Attendant', 'Attendant');
ddlArrayContainer[0] = ddlArrayItem1;
ddlArrayContainer[1] = ddlArrayItem2;
grid.Bands(0).Columns(4).ValueList = ddlArrayContainer;
The last line is returning some javascript error. I tried using :
grid.Bands[0].Columns[4].ValueList = ddlArrayContainer;
which still returned some error.
Please assist!
Try following code.
function grid_InitializeLayoutHandler(gridName)
{
var grid = igtbl_getGridById(gridName);
var col = grid.Bands[0].Columns[4];
var ddlArrayContainer = new Array();
ddlArrayContainer.push(ddlArrayItem1);
ddlArrayContainer.push(ddlArrayItem2);
col.ValueList = ddlArrayContainer;
}
Let me know if this works for you.
Greetings
Giving this a bump