Wrong forum.
Look at
http://www.infragistics.com/support/newsgroups.asp
BUT since you asking:
This example counts the columns of each band. For one column, (Phone) the
column is made non-editable.
function CountColumns(bt nEl) {
// Count all columns and place the value into the label field
// Use the variable automatically declared for the grid on the page.
var oGrid = oUltraWebGrid1;
// Get the Bands collection
var oBands = oGrid.Bands;
// Get the columns collection for Band 0
var oBand = oBands[0];
var oColumns = oBand.Columns;
// The column count is equal to the length of the Columns array.
var count = oColumns.length ;
var total = 0;
// Add up the number of columns in each band.
for(i=0; i<oBands.length ; i++) {
oBand = oBands[i];
total += oBand.Columns.l ength;
// iterate the columns of the band
for(c = 0; c < oBand.Columns.l ength; c++) {
var column = oBand.Columns[c];
if(column.Key == "Phone")
column.AllowUpd ate = 2; // AllowUpdate.No
}
}
}HTH
"miqbal" <mi****@abacuso ft.com> wrote in message
news:OT******** ******@TK2MSFTN GP11.phx.gbl...
How can I loop through the columns collection in client side javascript?
Or how can I get a column by the key, not just by the index in the
collection? in Infragistics webgrid
Thanks