coolite中window的值传递问题???急—急!!

whq0527 2010-10-11 09:24:45
最近在项目种使用到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中的控件居右。
...全文
186 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
NetX行者 2011-08-05
  • 打赏
  • 举报
回复
顶上~~~~~~~~~~~~~~~~~~
hoojo 2010-10-12
  • 打赏
  • 举报
回复
得到页面文本框,赋值即可。
关于居右可以改变布局方式,或是用css padding-left: "20px";

52,780

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 Ajax
社区管理员
  • Ajax
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧