Dec 28, 2011, 6:24 PM
How to Hide & Show a CommandColumn in a Grid ??
I have the Client & Admin, I ONLY want to show the Command Column base on their Windows NT login.
How would I go about doing that, because there is no ID or runat="server" on the "CommandColumn" ??
How would I go about doing that, because there is no ID or runat="server" on the "CommandColumn" ??
<ext:GridPanel ID="GridPanelPlants" runat="server" StripeRows="true" Title="Existing Plants"
TrackMouseOver="true" Icon="BuildingGo" Height="140" Width="575" AutoExpandColumn="PlantName"
StyleSpec="margin-left: 20px; margin-top: 20px;">
<Store>
<ext:Store ID="StorePlant" runat="server" AutoLoad="true" AutoDataBind="true">
<Reader>
<ext:JsonReader Root="plants" IDProperty="PlantCode">
<Fields>
<ext:RecordField Name="PlantCode" Type="String" />
<ext:RecordField Name="PlantName" Type="String" />
<ext:RecordField Name="DateStartRun" Type="Date" />
<ext:RecordField Name="DateEndRun" Type="String" />
<ext:RecordField Name="IsActive" Type="Boolean" />
</Fields>
</ext:JsonReader>
</Reader>
<SortInfo Field="PlantCode" Direction="ASC" />
</ext:Store>
</Store>
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column ColumnID="PlantCode" Header="Plant Code" DataIndex="PlantCode" />
<ext:Column Header="Plant Name" DataIndex="PlantName" />
<ext:DateColumn Header="Start Date" DataIndex="DateStartRun" Format="MM-dd-yyyy" />
<ext:DateColumn Header="End Date" DataIndex="DateEndRun" Format="MM-dd-yyyy" />
<ext:Column Header="Is Active" DataIndex="IsActive">
<Renderer Fn="formatStatus" />
</ext:Column>
<ext:CommandColumn Width="30">
<PrepareToolbar Fn="prepareToolbar" />
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true" />
</SelectionModel>
<Listeners>
<Command Fn="commandHandler" />
</Listeners>
<LoadMask ShowMask="true" />
</ext:GridPanel>