<ext:GridPanel
ID="GridPanel1"
runat="server"
Title="消息管理"
Frame="true"
StoreID="Store1"
AutoHeight="true"
AutoWidth="true">
<ColumnModel ID="ColumnModel1" runat="server">
<Columns>
<ext:Column DataIndex="Title" Header="标题">
<PrepareCommand Args="grid,command,record,row,col,value" FormatHandler="true" Handler="window.location.href('?command=state3')"></PrepareCommand>
</ext:Column>
<ext:Column DataIndex="Sent" Header="发送人">
<PrepareCommand Handler="" Args="grid,command,record,row,col,value" FormatHandler="False"></PrepareCommand>
</ext:Column>
<ext:CommandColumn Width="150" >
<Commands>
<ext:GridCommand Icon="NoteEdit" CommandName="update" Text="修改" Hidden="true" />
<ext:GridCommand Icon="Delete" CommandName="delete" Text="删除" />
<ext:GridCommand Icon="ApplicationGo" CommandName="select" Text="详情" />
</Commands> <PrepareToolbar Handler="" Args="grid,toolbar,rowIndex,record" FormatHandler="False"></PrepareToolbar> <PrepareGroupToolbar Handler="" Args="grid,toolbar,groupId,records" FormatHandler="False"></PrepareGroupToolbar>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<SelectionModel>
<ext:CheckboxSelectionModel />
</SelectionModel>
<LoadMask ShowMask="true" />
<BottomBar>
<ext:PagingToolBar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="Store1" RefreshText="刷新"/>
</BottomBar>
<Listeners>
<%--用户ID = record.data.UId cmd 来自command--%>
<Command Handler="window.location.href('?id='+ record.data.MessageId + '&command=' + command)" />
</Listeners> </ext:GridPanel>我想在代码里控制 <ext:GridCommand Icon="NoteEdit" CommandName="update" Text="修改" Hidden="true" />这个控件的Hidden属性,用什么方法合适?
解决方案 »
- 变量定义在Page_Load里和外部有什么区别?
- 如何用DataList让不同的背景交互显示?
- 求treeview的三层代码~~~~~~~~~~
- 关于图片上传
- 在应用程序级别之外使用注册为 allowDefinition='MachineToApplication' 的节是错误的。如果在 IIS 中没有将虚拟目录配置为
- 在ASP.NET中用C#怎样根据DB的数据画线,给个例子或建议
- 我要数据分布的详细教程,我真地不会,呜……
- 求楼盘对比功能实现思路
- 如何打开一个新的浏览器窗口
- 请教一个有关DropDownList列的隐藏与显示的问题!
- 地址连接定位框架问题
- iframe局部刷新运行时提示没有权限
参考下吧
http://www.coolite.com
特别流行的
GridCommand gridCommand = commandColumn.Commands[j] as GridCommand;
gridCommand.Hidden = true;