最近在项目种使用到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中的控件居右。