USerControlForm Widthe is not correct

2 posts, 1 answers
  1. Perry
    Perry avatar
    25 posts
    Member since:
    Jul 2015

    Posted 24 Mar Link to this post

    I have a user control form set for editing and adding records but the form data fields are off the form hard to explain so I have attached a screen shot.  Looks like I need to increase the width of the form but all of my attempts to that have no effect.  Can any one explain what I am missing?  Not sure what properties I need to change and I hate to do it but below is the code I use for this grid

    <body>
        <div></div>
        <form id="form1" runat="server">
            <div>
            <asp:Label ID="Label1" runat="server" Text="Search Case Nunber: "></asp:Label>    <asp:TextBox ID="txtSearchBox" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Go" OnClick="Button1_Click" /><br /><br />
            </div>
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="RadGrid1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                        <telerik:AjaxSetting AjaxControlID="ConfiguratorPanel">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
            <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Windows7"></telerik:RadAjaxLoadingPanel>
            <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecorationZoneID="Grid" DecoratedControls="All" EnableRoundedCorners="false"  />
     
        <div id="Grid" class="Grid-container">
            <telerik:RadGrid ID="RadGridInvestigations"
                runat="server"
                AutoGenerateColumns="False"
                AllowPaging="True"
                AllowSorting="True"
                AllowAutomaticInserts="True"
                OnNeedDataSource="RadGridInvestigation_NeedDataSource"
                OnItemCreated="RadGridInvestigation_ItemCreated"
                OnUpdateCommand="RadGridInvestigation_UpdateCommand"
                OnInsertCommand="RadGridInvestigation_InsertCommand"
                Font-Size="Large">
                <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                <MasterTableView
                    EditMode="PopUp"
                    AutoGenerateColumns="false"
                    DataKeyNames="CaseID"
                    GridLines="Horizontal"
                    CommandItemDisplay="Top" 
                    NoMasterRecordsText="No Records matched your search return to the search page and try again." ShowFooter="False"
                    <EditFormSettings>
                        <PopUpSettings Modal="False"/>
                    </EditFormSettings>
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton"></telerik:GridEditCommandColumn>
                        <telerik:GridBoundColumn DataField="CaseID" HeaderText="Case ID" ReadOnly="true" ForceExtractValue="Always" ConvertEmptyStringToNull="true" Display="false" UniqueName="CaseID" />
                        <telerik:GridBoundColumn DataField="CaseNumber" HeaderText="CaseNumber" UniqueName="CaseNumber" ReadOnly="false" Display="false"/>
                        <telerik:GridHyperLinkColumn FilterControlAltText ="Filter CaseNumber column"
                               Uniquename="CaseNumber" DataNavigateUrlFormatString ="~/InvWithTips.aspx?CaseNumber={0}"
                                DataTextField="CaseNumber" HeaderText="Case Number"
                                DataNavigateUrlFields="CaseNumber"
                                SortExpression="CaseNumber" HeaderStyle-Wrap="false" >
                        </telerik:GridHyperLinkColumn>
                            <telerik:GridBoundColumn DataField="CaseName" HeaderText="Name" SortExpression="CaseName"
                                UniqueName="CaseName" Display="True">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="InvestigativeUnit" HeaderText="Unit Assigned" SortExpression="InvestigativeUnit"
                                UniqueName="InvestigativeUnit" HeaderStyle-Wrap="True">
                            </telerik:GridBoundColumn>
                           <telerik:GridBoundColumn DataField="PrimaryContact" HeaderText="PrimaryContact" SortExpression="PrimaryContact"
                                UniqueName="PrimaryContact">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="PrimaryContactEmail" HeaderText="PrimaryContactEmail" SortExpression="PrimaryContactEmail"
                                UniqueName="PrimaryContactEmail">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="PrimaryContactPhone" HeaderText="Primary Phone" SortExpression="PrimaryContactPhone"
                                UniqueName="PrimaryContactPhone">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="SecondaryContact" HeaderText="2nd Contact" SortExpression="PrimaryContact"
                                UniqueName="SecondaryContact">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="SecondaryEmail" HeaderText="2nd Email" SortExpression="SecondaryEmail"
                                UniqueName="SecondaryEmail">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="SecondaryPhone" HeaderText="2nd Phone" SortExpression="SecondaryPhone"
                                UniqueName="SecondaryPhone">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DateOpened" HeaderText="DateOpened" SortExpression="DateOpened"
                                UniqueName="DateOpened" DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="Status" HeaderText="Status" SortExpression="Status"
                                UniqueName="Status">
                            </telerik:GridBoundColumn>
                            <telerik:GridBoundColumn DataField="DateClosed" HeaderText="DateClosed" SortExpression="DateClosed"
                                UniqueName="DateClosed" DataFormatString="{0:dd/MM/yyyy}">
                            </telerik:GridBoundColumn>
                        </Columns>
                    <EditFormSettings UserControlName="InvestigationDetailsControl.ascx" EditFormType="WebUserControl" PopUpSettings-Width="400px">
                            <EditColumn UniqueName="EditCommandColumn1" ></EditColumn>
                         </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>
        </div>
            <telerik:RadInputManager runat="server" ID="RadInputManager1" Enabled="true">
                    <telerik:TextBoxSetting BehaviorID="TextBoxSetting1">
                    </telerik:TextBoxSetting>
                </telerik:RadInputManager>
                <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
            </form>
     
    </body>

    Any help would be great

     

    Thanks

    Perry

  2. Answer
    Pavlina
    Admin
    Pavlina avatar
    6084 posts

    Posted 25 Mar Link to this post

    Hi,

    It seems that the PopUpSettings-Width="400px" which you have explicitly set is not enough. Try to leave the popup without width or calculate it according to the controls width that are placed in it so they can fit in the available space.

    Regards,
    Pavlina
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top