View Full Version : Hide the grid coloum Based on Button Click

Nov 17, 2009, 3:03 AM
Hi All,

I want to hide the grid coloum Based on comboselection.

I can try these for combo selection event
<U>In aspx page

<ext:ComboBox ID="cmbArea" runat="server" Width="115" >

<Items >

<ext:ListItem Text="aa" Value="aa" />


<AjaxEvents >

<Select OnEvent="cmbArea_Click" />



<U>In Cs file:-


protected void cmbArea_Click(object sender, AjaxEventArgs e)


if (cmbArea.SelectedItem.Text == "aa")


ExitGateDetGrid.ColumnModel.Columns[2].Hidden = true;



</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.

Nov 17, 2009, 3:55 AM

Please use ColumnModel functions, for example, SetHidden