• Coolite 中GridView点击行中的按钮时跳转至不同的页面


    效果图:

    关键代码

      <Command Handler="if(command=='butPhone'){location.href='CallIn.aspx?NetUserName='+record.data.NetUserName;} else {location.href='Customer.aspx?NetUserName='+record.data.NetUserName;}" />

    Html全部代码

    代码
    <ext:GridPanel ID="GridPanel1" Height="475" StoreID="Store1" runat="server" >
    <ColumnModel ID="ColumnModelTitle" IDMode="Legacy" Height="200" runat="server">
    <Columns>
    <ext:ImageCommandColumn Width="70">
    <Commands>
    <ext:ImageCommand CommandName="butPhone" Icon="Telephone">
    <ToolTip Text="电话业务" />
    </ext:ImageCommand >
    <ext:ImageCommand></ext:ImageCommand>
    <ext:ImageCommand CommandName="butCustomer" Icon="UserEdit">
    <ToolTip Text="客户详情" />
    </ext:ImageCommand >
    </Commands>
    </ext:ImageCommandColumn >
    <ext:Column ColumnID="NetUserName" DataIndex="NetUserName" Header="客户帐号" Sortable="true"/>
    <ext:Column ColumnID="CustomerName" DataIndex="CustomerName" Header="客户姓名" Sortable="true"/>
    <ext:Column ColumnID="TelePhone" DataIndex="TelePhone" Header="手机" Sortable="false"/>
    <ext:Column ColumnID="Mobil" DataIndex="Mobil" Header="电话" Sortable="false" Width="100"/>

    </Columns>
    </ColumnModel>
    <Listeners>
    <Command Handler="if(command=='butPhone'){location.href='CallIn.aspx?NetUserName='+record.data.NetUserName;} else {location.href='Customer.aspx?NetUserName='+record.data.NetUserName;}" />
    </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>
  • 相关阅读:
    vs2017中信号与槽连接
    生成格雷码
    结构光三维测量技术
    格雷码生成算法
    结构光三维重建
    Qt之CMake和MinGW编译OpenCV
    qt+opencv编译环境的配置
    vs2017+opencv配置参考链接
    2019-3-25多线程的同步与互斥(互斥锁、条件变量、读写锁、自旋锁、信号量)
    2019-3-22c# TextBox只允许输入数字,禁用右键粘贴,允许Ctrl+v粘贴数字
  • 原文地址:https://www.cnblogs.com/hailexuexi/p/1903654.html
Copyright © 2020-2023  润新知