coolite中window的值传递问题???急—急!!
时间:2010-10-11
来源:互联网
最近在项目种使用到COOLITE 0.8的控件,我将WINDOW做成一个用户空间,单击页面中的button按钮弹出window用户控件,在用户控件中使用了gridpanel,现在我要把在gridpanel中选中行的数据传递给原始页面的文本框,但这个值一弄了和久都没法传过去,有哪位大侠知道的指点一下小弟。小弟将不胜感激!
以下是用户控件的代码 (需要传递的值是仓库名称和仓库编号)
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StorageControl.ascx.cs"
Inherits="CustomControl_StorageControl" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<ext:Window ID="Window1" runat="server" Width="800" Height="540" Title="仓库列表" BodyStyle="padding:0px 6px 6px 6px;">
<Body>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:Panel ID="pnlStorage" runat="server" FormGroup="true" AutoHeight="true" ButtonAlign="Center"
Height="0">
<Body>
<ext:FormLayout runat="server" ID="floStorage" LabelWidth="55">
<ext:Anchor>
<ext:MultiField ID="mtfStorage" runat="server" FieldLabel="仓库名称">
<Fields>
<ext:TextField ID="txtfStorage" runat="server" FieldLabel="仓库名称">
</ext:TextField>
</Fields>
<Fields>
<ext:Button ID="btnSelect" runat="server" Text="开始查询">
<AjaxEvents>
<Click OnEvent="btnSelect_Click"></Click>
</AjaxEvents>
</ext:Button>
</Fields>
</ext:MultiField>
</ext:Anchor>
<ext:Anchor>
<ext:GridPanel ID="gpnStorage" runat="server" StoreID="stoStorage" StripeRows="true"
Height="420">
<ColumnModel ID="ColumnModel" runat="server">
<Columns>
<ext:CommandColumn Header="操作" Width="60">
<Commands>
<ext:GridCommand CommandName="Select" Text="选择">
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
<ext:Column Header="仓库编号" DataIndex="StorageNum">
</ext:Column>
<ext:Column Header="仓库名称" DataIndex="StorageName">
</ext:Column>
<ext:Column Header="省份" DataIndex="Pronice">
</ext:Column>
<ext:Column Header="地市" DataIndex="City">
</ext:Column>
<ext:Column Header="地址" DataIndex="Adress">
</ext:Column>
<ext:Column Header="管理员" DataIndex="Admin">
</ext:Column>
<ext:Column Header="备注" DataIndex="Remark">
</ext:Column>
</Columns>
</ColumnModel>
<Listeners>
<Command Handler="Coolite.AjaxMethods.gpnStorage_Command(command,record.data.NO);" />
</Listeners>
<LoadMask ShowMask="true" />
<BottomBar>
<ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="stoStorage" />
</BottomBar>
</ext:GridPanel>
</ext:Anchor>
</ext:FormLayout>
</Body>
<Buttons>
<ext:Button ID="btnCancel" runat="server" Text="取消" AutoShow="true">
</ext:Button>
</Buttons>
</ext:Panel>
</ext:FitLayout>
<ext:Store ID="stoStorage" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Operate" Type="Auto">
</ext:RecordField>
<ext:RecordField Name="StorageNum" Type="String">
</ext:RecordField>
<ext:RecordField Name="StorageName" Type="String">
</ext:RecordField>
<ext:RecordField Name="Pronice" Type="String">
</ext:RecordField>
<ext:RecordField Name="City" Type="String">
</ext:RecordField>
<ext:RecordField Name="Adress" Type="String">
</ext:RecordField>
<ext:RecordField Name="Admin" Type="String">
</ext:RecordField>
<ext:RecordField Name="Remark" Type="String">
</ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Body>
</ext:Window>
另外还有个问题就是这么把MultiField中的控件居右。
以下是用户控件的代码 (需要传递的值是仓库名称和仓库编号)
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="StorageControl.ascx.cs"
Inherits="CustomControl_StorageControl" %>
<%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
<ext:Window ID="Window1" runat="server" Width="800" Height="540" Title="仓库列表" BodyStyle="padding:0px 6px 6px 6px;">
<Body>
<ext:FitLayout ID="FitLayout1" runat="server">
<ext:Panel ID="pnlStorage" runat="server" FormGroup="true" AutoHeight="true" ButtonAlign="Center"
Height="0">
<Body>
<ext:FormLayout runat="server" ID="floStorage" LabelWidth="55">
<ext:Anchor>
<ext:MultiField ID="mtfStorage" runat="server" FieldLabel="仓库名称">
<Fields>
<ext:TextField ID="txtfStorage" runat="server" FieldLabel="仓库名称">
</ext:TextField>
</Fields>
<Fields>
<ext:Button ID="btnSelect" runat="server" Text="开始查询">
<AjaxEvents>
<Click OnEvent="btnSelect_Click"></Click>
</AjaxEvents>
</ext:Button>
</Fields>
</ext:MultiField>
</ext:Anchor>
<ext:Anchor>
<ext:GridPanel ID="gpnStorage" runat="server" StoreID="stoStorage" StripeRows="true"
Height="420">
<ColumnModel ID="ColumnModel" runat="server">
<Columns>
<ext:CommandColumn Header="操作" Width="60">
<Commands>
<ext:GridCommand CommandName="Select" Text="选择">
</ext:GridCommand>
</Commands>
</ext:CommandColumn>
<ext:Column Header="仓库编号" DataIndex="StorageNum">
</ext:Column>
<ext:Column Header="仓库名称" DataIndex="StorageName">
</ext:Column>
<ext:Column Header="省份" DataIndex="Pronice">
</ext:Column>
<ext:Column Header="地市" DataIndex="City">
</ext:Column>
<ext:Column Header="地址" DataIndex="Adress">
</ext:Column>
<ext:Column Header="管理员" DataIndex="Admin">
</ext:Column>
<ext:Column Header="备注" DataIndex="Remark">
</ext:Column>
</Columns>
</ColumnModel>
<Listeners>
<Command Handler="Coolite.AjaxMethods.gpnStorage_Command(command,record.data.NO);" />
</Listeners>
<LoadMask ShowMask="true" />
<BottomBar>
<ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="10" StoreID="stoStorage" />
</BottomBar>
</ext:GridPanel>
</ext:Anchor>
</ext:FormLayout>
</Body>
<Buttons>
<ext:Button ID="btnCancel" runat="server" Text="取消" AutoShow="true">
</ext:Button>
</Buttons>
</ext:Panel>
</ext:FitLayout>
<ext:Store ID="stoStorage" runat="server">
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Operate" Type="Auto">
</ext:RecordField>
<ext:RecordField Name="StorageNum" Type="String">
</ext:RecordField>
<ext:RecordField Name="StorageName" Type="String">
</ext:RecordField>
<ext:RecordField Name="Pronice" Type="String">
</ext:RecordField>
<ext:RecordField Name="City" Type="String">
</ext:RecordField>
<ext:RecordField Name="Adress" Type="String">
</ext:RecordField>
<ext:RecordField Name="Admin" Type="String">
</ext:RecordField>
<ext:RecordField Name="Remark" Type="String">
</ext:RecordField>
</Fields>
</ext:JsonReader>
</Reader>
</ext:Store>
</Body>
</ext:Window>
另外还有个问题就是这么把MultiField中的控件居右。
作者: whq0527 发布时间: 2010-10-11
CSS code
得到页面文本框,赋值即可。
关于居右可以改变布局方式,或是用css padding-left: "20px";
作者: IBM_hoojo 发布时间: 2010-10-12
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28