Infragistic webgrid Column collection

Discussion in 'ASP .Net' started by miqbal, Jul 17, 2003.

  1. miqbal

    miqbal Guest

    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
    miqbal, Jul 17, 2003
    #1
    1. Advertising

  2. miqbal

    Anatoly Guest

    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(btnEl) {
    // 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;
    total += oBand.Columns.length;
    // iterate the columns of the band
    for(c = 0; c < oBand.Columns.length; c++) {
    var column = oBand.Columns[c];
    if(column.Key == "Phone")
    column.AllowUpdate = 2; // AllowUpdate.No
    }
    }
    }HTH
    "miqbal" <> wrote in message
    news:...
    > 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
    >
    >
    Anatoly, Jul 17, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Infragistics - WebGrid

    , Jul 19, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,678
    Aaron Corcoran
    Jul 19, 2005
  2. =?Utf-8?B?U29oYW4gS2FtYXQ=?=

    Infragistic Ultrawebgrid

    =?Utf-8?B?U29oYW4gS2FtYXQ=?=, Aug 17, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    1,892
    =?Utf-8?B?U29oYW4gS2FtYXQ=?=
    Aug 17, 2005
  3. Tomas Rivas
    Replies:
    0
    Views:
    312
    Tomas Rivas
    Dec 8, 2006
  4. Øyvind Isaksen
    Replies:
    1
    Views:
    965
    Øyvind Isaksen
    May 18, 2007
  5. Angel

    Update Checkbox Column in WebGrid

    Angel, Nov 23, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    211
    Angel
    Nov 23, 2005
Loading...

Share This Page