Coolite 中GridView行按钮取行ID并调用服务器端代码
生活随笔
收集整理的這篇文章主要介紹了
Coolite 中GridView行按钮取行ID并调用服务器端代码
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
效果圖:
關系代碼:
?<Command Handler="if(command=='butSelectReocrd'){str=record.data.SessionId; #{AjaxMethods}.SelectRecord(str);}" />
全部html代碼:
代碼 <ext:GridPanel ID="GridPanel1" Height="325" StoreID="Store1" runat="server" ><ColumnModel ID="ColumnModelTitle" IDMode="Legacy" Height="30" runat="server">
<Columns>
<ext:ImageCommandColumn Width="50" Align="Center" >
<Commands>
<ext:ImageCommand CommandName="butSelectReocrd" Icon="Magnifier" >
<ToolTip Text="錄音詳情" />
</ext:ImageCommand >
</Commands>
</ext:ImageCommandColumn >
<ext:Column ColumnID="SessionId" DataIndex="SessionId" Header="錄音編號" Sortable="true" Width="120"/>
<ext:Column ColumnID="RecordFile" DataIndex="RecordFile" Header="錄音文件" Sortable="false" Width="120"/>
</Columns>
</ColumnModel>
<Listeners>
<Command Handler="if(command=='butSelectReocrd'){str=record.data.SessionId; #{AjaxMethods}.SelectRecord(str);}" />
</Listeners>
<SelectionModel>
<ext:RowSelectionModel SelectedRecordID="id" ID="RowSelectionModel1" runat="server">
<CustomConfig>
<ext:ConfigItem Name="checkOnly" Value="true" Mode="Raw" />
</CustomConfig>
</ext:RowSelectionModel>
</SelectionModel>
<LoadMask ShowMask="true" Msg="Load..."/>
</ext:GridPanel>
C#代碼:
?
代碼 [AjaxMethod]public void SelectRecord(string strSessionId)//record.data.SessionId
{
this.txtNetUserName1.Text = strSessionId;
this.txtCustomerName.Text = "1111111";
this.txtRecordFile.Text = "d:\\1111.wav";
strPlayFile=@"d:\1111.wav";
}
?
?
?
總結
以上是生活随笔為你收集整理的Coolite 中GridView行按钮取行ID并调用服务器端代码的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 使用海思烧录工具hitool烧写鸿蒙2.
- 下一篇: 线性回归的Spark实现 [Linear