Hide the grid coloum Based on Button Click

  1. #1

    Hide the grid coloum Based on Button Click



    Hi All,

    I want to hide the grid coloum Based on comboselection.


    I can try these for combo selection event
    <U>In aspx page
    </U>
     
    
    
    <ext:ComboBox ID="cmbArea" runat="server" Width="115" >
    
    
    <Items >
    
    
    <ext:ListItem Text="aa" Value="aa" /> 
    
    
    </Items>
    
    
    <AjaxEvents >
    
    
    <Select OnEvent="cmbArea_Click" /> 
    
    
    </AjaxEvents>
    
    
    </ext:ComboBox>
    <U>In Cs file:-
    </U>
    
    
    protected void cmbArea_Click(object sender, AjaxEventArgs e)
    
    
    {
    
    
    if (cmbArea.SelectedItem.Text == "aa")
    
    
    {
    
    
    ExitGateDetGrid.ColumnModel.Columns[2].Hidden = true;
    
    
    }
    
    
    }
    <U>
    </U> But it will not woork.(i.e column 3 will not be hidden)

    So plz help me for hiding the grid column based on button or(Checkbox selection) click.

    Thanks in Advance.
  2. #2

    RE: Hide the grid coloum Based on Button Click

    Hi,

    Please use ColumnModel functions, for example, SetHidden

Similar Threads

  1. Replies: 8
    Last Post: Nov 28, 2011, 9:25 AM
  2. Replies: 2
    Last Post: Sep 09, 2010, 8:25 PM
  3. [CLOSED] gridpanel show/ hide header based on toolbar button
    By yobnet in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Sep 08, 2010, 12:41 PM
  4. [CLOSED] Hide element in grid based on record value
    By rthiney in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 25, 2010, 3:39 PM
  5. Sho/Hide Tabs based on TreeNode click?
    By yaser82 in forum 1.x Help
    Replies: 2
    Last Post: Jan 21, 2009, 4:52 AM

Posting Permissions