Problem with TextField in Window

  1. #1

    Problem with TextField in Window

    Friends,
    I need your help, I have a user control with a window, this takes the information sent from a page, when I save the information, text field is blank, can you help?.
    Thank you.

    Here the complete code, thanks.

    BasicConfig.aspx
    ...
    <%@ Register src="~/UserControls/wucParamwindow.ascx" tagname="wucParamWindow" tagprefix="uc1" %>
    
    <asp:Content ID="ContentEBusiness" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
        <ext:TabPanel ID="tbpConfiguration" runat="server" ActiveTabIndex="0"
            Frame="True" Height="700px">
            <tabs>
                <ext:Tab ID="tbDepartament" runat="server" Title="Departamentos" Frame="true" Icon="ApplicationViewTile">
                    <body>
                        <ext:Store ID="StoreDepartament" runat="server" AutoDataBind="true" AutoLoad="true" OnRefreshData="StoreDepartament_RefreshData">
                        </ext:Store>
                        <ext:GridPanel ID="GridDepartament" runat="server" ...>
                          <ColumnModel ID="ctl366" IDMode="Legacy">
                                 </ColumnModel>
                        <SelectionModel>
                                     <ext:RowSelectionModel ID="RowSelectionModelDepartament" runat="server" SingleSelect="true" />
                                </SelectionModel>
                                 <BottomBar>
                                <ext:PagingToolBar ID="ptbDepartament" runat="server" PageSize="20" />
                            </BottomBar>
                        <Buttons>
                           <ext:Button ID="bAddDepartament" runat="server" Text="Agregar" Icon="Add">
                           <AjaxEvents>
                            <Click OnEvent="ShowParamWindow"></Click>
                           </AjaxEvents>
                           </ext:Button>
                           <ext:Button ID="bEditDepartament" runat="server" Text="Editar" Icon="NoteEdit">
                           <AjaxEvents>
                            <Click OnEvent="ShowParamWindow"></Click>
                           </AjaxEvents>
                           </ext:Button>
                           <ext:Button ID="bDeleteDepartament" runat="server" Text="Eliminar" Icon="Delete"></ext:Button>
                       
                        </Buttons>
                        </ext:GridPanel>
    
                    </body>
                   
    
                </ext:Tab>
       
               
            </tabs>
         
        </ext:TabPanel>
        <uc1:wucParamWindow ID="wucParamWindow1" runat="server" />
    </asp:Content>
    BasicConfig.aspx.cs
    using System;
    ...
    public partial class BasicConfig : System.Web.UI.Page
    {
    
            public void ShowParamWindow(object sender, AjaxEventArgs e)
        {
           
            Coolite.Ext.Web.Button bParent = (Coolite.Ext.Web.Button)sender;
           this.wucParamWindow1.Show(1,2,EParameterType.DEPARTAMENT,EActionType.INSERT);
    
        }
     
      
    }
    wucParamwindow.ascx


    
    <ext:Window ID="winParam" runat="server" Icon="Application" Title="Valor"
        Closable="False" Height="150px" Width="350px" Modal="True"
        AutoRender="False">
        <Body>
            <ext:FormPanel ID="fpParam" runat="server" BodyStyle="padding:5px;" ButtonAlign="Right"
                Frame="true" Height="100px" LabelWidth="50" Width="340px">
                <Body>
                    <ext:FormLayout ID="flParam" runat="server">
                        <ext:Anchor Horizontal="90%">
                            <ext:TextField ID="txtParamName" runat="server" FieldLabel="Valor">
                            </ext:TextField>
                        </ext:Anchor>
                        <ext:Anchor Horizontal="90%">
                              <ext:TextField  ID="hdnParent" runat="server" />
                        </ext:Anchor>
                    </ext:FormLayout>
                </Body>
            </ext:FormPanel>
         
        </Body>
            <Buttons>
                <ext:Button runat="server" ID="bPrmSave" Text="Grabar" Icon="Disk">
               <AjaxEvents >
              <Click OnEvent="bPrmSave_Click">
                <EventMask  ShowMask="true" Msg="Verifying..." MinDelay="500" />
              </Click>
             </AjaxEvents>
                </ext:Button>
       </Buttons>
    </ext:Window>
    wucParamwindow.ascx.cs
    using System;
    ....
    public partial class wucParamWindow : System.Web.UI.UserControl
    {
      
        public void Show(int companyId, int fieldId, EParameterType parameterType, EActionType actionType)
        {
              this.winParam.Show();
              //Here, take the parameters are set correctly and to hdnParent
              this.hdnParent.Text = string.Format("{0};{1};{2};{3}", companyId, fieldId, Convert.ToInt32(parameterType), Convert.ToInt32(actionType));   
        }
    
        protected void bPrmSave_Click(object sender, EventArgs e)
        {
    
            string[] arrInfo = this.hdnParent.Text.Split(';');//Here, hdnParent is blank
                ParameterBridge parameterBridge = new ParameterBridge();
                parameterBridge.InsertParameter(Convert.ToInt32(arrInfo[0]),
                                                Convert.ToInt32(arrInfo[1]),
                                                this.txtParamName.Text,//Here, hdnParent is blank
                                                (EParameterType)Convert.ToInt32(arrInfo[2]),
                                                (EActionType)Convert.ToInt32(arrInfo[3]));
        }
    }
  2. #2

    RE: Problem with TextField in Window

    The problem is AutoRender=False on your window. Make it to true.

    See this for more information:
    http://forums.ext.net/showthread.php...26849-4-1.aspx

Similar Threads

  1. [CLOSED] Problem: Closing Maximized Window will loose parent window scrollbar
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 8:51 PM
  2. [CLOSED] How to focus TextField in Window?
    By macap in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 14, 2010, 8:18 AM
  3. Set focus on TextField after window load
    By sfvaleriano in forum 1.x Help
    Replies: 0
    Last Post: Oct 15, 2009, 8:27 AM
  4. [CLOSED] Set Focus to textfield in logon window
    By HOWARDJ in forum 1.x Legacy Premium Help
    Replies: 7
    Last Post: May 17, 2009, 9:41 PM
  5. Replies: 1
    Last Post: Apr 01, 2009, 12:24 PM

Posting Permissions