[CLOSED] GridPanel get Column in ColumnModel by ID

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    [CLOSED] GridPanel get Column in ColumnModel by ID

    Hi,

    is there some way instead of only using index

    this.GridPanel1.ColumnModel.SetHidden(2, true);
    to get the correct Column by ID (without looping) like

    this.GridPanel1.ColumnModel.SetHidden("ColumnID", true);
    
    this.GridPanel1.ColumnModel.Columns["ColumnID"].Hidden = true;
    
    this.GridPanel1.ColumnModel.Columns[this.GridPanel1.ColumnModel.findColumnIndex("ColumnID")].Hidden = true;
    if not, whats the best way of looping over the set of columns on runtime?
    If i use this code:

    foreach (var col in GridPanel1.ColumnModel.Columns)
    {
        if (col.ColumnID.Equals("ID_XYZ"))
        {
    I receive this Exception: Unable to cast object of type 'Ext.Net.CheckColumn' to type 'Ext.Net.Column'.

    Kind regards.
    Last edited by Daniil; Jan 09, 2011 at 12:06 PM. Reason: [CLOSED]

Similar Threads

  1. [CLOSED] [Razor] GridPanel ColumnModel Commands
    By Timothy in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: May 09, 2012, 9:39 PM
  2. Replies: 2
    Last Post: Oct 07, 2011, 3:55 PM
  3. Replies: 2
    Last Post: Oct 07, 2011, 3:54 PM
  4. Selecting different columnmodel for gridpanel.
    By masudcseku in forum 1.x Help
    Replies: 5
    Last Post: May 11, 2011, 5:09 PM
  5. Add ColumnModel to GridPanel
    By aalkema in forum 1.x Help
    Replies: 0
    Last Post: Apr 27, 2009, 11:58 AM

Tags for this Thread

Posting Permissions