This is a migrated thread and some comments may be shown as answers.

After displaying the dialog, part of the character in the textbox disappears.

3 Answers 52 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mayur
Top achievements
Rank 1
Mayur asked on 05 Mar 2014, 10:32 AM
I have a radtextbox with width 200px and i am having another button on which i am showing a radwindow , when i clicking on button radwindow appears but the text in textbox hides ,but when i click on textbox it shows the data .I dont want this to happen.



Any solutions.Please Suggest.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 Mar 2014, 10:51 AM
Hi Mayur,

Please have a look into the sample code snippet which works fine at my end.

ASPX;
<telerik:RadTextBox ID="RadTextBox1" runat="server" Width="200px">
</telerik:RadTextBox>
<telerik:RadButton ID="RadButton1" runat="server" Text="ShowWindow" OnClick="RadButton1_Click">
</telerik:RadButton>
<telerik:RadWindow ID="RadWindow1" runat="server">
</telerik:RadWindow>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadButton1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadWindow1" />
                <telerik:AjaxUpdatedControl ControlID="RadTextBox1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

C#:
protected void RadButton1_Click(object sender, EventArgs e)
{
    RadWindow1.VisibleOnPageLoad = true;
}

Please provide your code if it doesn't help.
Thanks,
Princy.
0
Mayur
Top achievements
Rank 1
answered on 05 Mar 2014, 11:01 AM
Hi,

I have put my textbox in updated Control but it throws script error as could not define object or null reference.


Here is my code

  <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnClassification">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="radWinSelEquipCate" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>

-------------------------------------------------------------------------------------------------------------------------------------------------------

  <telerik:RadButton ID="btnClassification" runat="server" OnClick="SelEquipCat" Text="Classification"
                                Width="90px">
                            </telerik:RadButton>

----------------------------------------------------------------------------------------------------------------------------------------------------------

<telerik:RadWindowManager ID="radWinManSelEquipCate" runat="server" VisibleStatusbar="false"
            Width="730px" Height="520px" ReloadOnShow="true" EnableShadow="true" ShowContentDuringLoad="false">
            <Windows>
                <telerik:RadWindow ID="radWinSelEquipCate" runat="server" SkinID="Office2010" ShowContentDuringLoad="false"
                    VisibleOnPageLoad="false" Height="507px" Width="800px" Modal="true" BackColor="#DADADA"
                    VisibleStatusbar="false" Behaviors="Move,Close" Title="Equipment  Classification Selection">
                    <ContentTemplate>
                        <telerik:RadAjaxPanel ID="RadAjaxPanel4" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                            <div style="padding: 10px; padding-bottom: 0px">
                                <table>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblPleaseSelectSmallCategory" runat="server" Style="color: Blue; font-size: 15px;"
                                                Text=""></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2" style="height: 20px !important">
                                            <asp:Label ID="lbl_cat_error" Style="color: Red;" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <div style="overflow: auto; border-color: #D0D7E5; border: 1px solid #D0D7E5; width: 100%">
                                                <div style="width: 99.6%; height: 350px;">
                                                    <telerik:RadGrid ID="grd_EquipCate" runat="server" CssClass="RadGrid" GridLines="None"
                                                        AllowPaging="True" PageSize="10" AllowSorting="True" ShowStatusBar="true" AllowAutomaticInserts="false"
                                                        AllowMultiRowSelection="False" HorizontalAlign="NotSet" GroupingEnabled="true"
                                                        ShowGroupPanel="false" OnNeedDataSource="grd_EquipCate_NeedDataSource" OnPageIndexChanged="grd_EquipCate_PageIndexChanged"
                                                        OnPageSizeChanged="grd_EquipCate_PageSizeChanged">
                                                        <GroupingSettings GroupContinuedFormatString="" GroupContinuesFormatString="" GroupSplitDisplayFormat=""
                                                            GroupSplitFormat="{0}" />
                                                        <ClientSettings AllowExpandCollapse="True">
                                                            <Selecting AllowRowSelect="True" UseClientSelectColumnOnly="True" />
                                                            <Resizing AllowColumnResize="true" AllowResizeToFit="true" EnableRealTimeResize="false" />
                                                            <ClientEvents OnGridCreated="Grid_AccEquip_classification" />
                                                        </ClientSettings>
                                                        <MasterTableView CommandItemDisplay="TopAndBottom" DataKeyNames="Id" EditMode="PopUp">
                                                            <CommandItemSettings ExportToPdfText="Export to PDF" ShowAddNewRecordButton="false"
                                                                ShowRefreshButton="false"></CommandItemSettings>
                                                            <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
                                                            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                                                            </RowIndicatorColumn>
                                                            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                                                            </ExpandCollapseColumn>
                                                            <GroupHeaderTemplate>
                                                                <asp:Label runat="server" ID="Label10sdf" Text='<%# ""+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeSortOrder"])  + ",&*KeyToDivide,SortOrder,&*KeyToDivide,"+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeSortOrderName"]) %>'
                                                                    Visible='<%# ((((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeSortOrderName"]) != null)%>'>
                                                                </asp:Label>
                                                                <asp:Label runat="server" ID="Label4sd" Text='<%# Server.HtmlEncode(""+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeName"]) +""+ ",&*KeyToDivide,EquipmentLarge,&*KeyToDivide,"+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeNameCount"])) %>'
                                                                    Visible='<%# ((((GridGroupHeaderItem)Container).AggregatesValues["EquipmentLargeNameCount"]) != null)%>'>
                                                                </asp:Label>
                                                                <asp:Label runat="server" ID="Label9sdf" Text='<%# ""+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentMiddleSortOrder"])  + ",&*KeyToDivide,SortOrder,&*KeyToDivide,"+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipmentMiddleSortOrderCount"]) %>'
                                                                    Visible='<%# ((((GridGroupHeaderItem)Container).AggregatesValues["EquipmentMiddleSortOrderCount"]) != null)%>'>
                                                                </asp:Label>
                                                                <asp:Label runat="server" ID="Label2sdf" Text='<%# Server.HtmlEncode(""+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipMiddleName"]) +""+ ",&*KeyToDivide,EquipMiddle,&*KeyToDivide,"+ (((GridGroupHeaderItem)Container).AggregatesValues["EquipMiddleNameCount"])) %>'
                                                                    Visible='<%# ((((GridGroupHeaderItem)Container).AggregatesValues["EquipMiddleNameCount"]) != null)%>'>
                                                                </asp:Label>
                                                            </GroupHeaderTemplate>
                                                            <GroupByExpressions>
                                                                <telerik:GridGroupByExpression>
                                                                    <SelectFields>
                                                                        <telerik:GridGroupByField FieldName="EquipmentLargeSortOrder" FieldAlias="EquipmentLargeSortOrderName" />
                                                                        <telerik:GridGroupByField FieldName="EquipmentLargeSortOrder" FieldAlias="EquipmentLargeNameCount" />
                                                                    </SelectFields>
                                                                    <GroupByFields>
                                                                        <telerik:GridGroupByField FieldName="EquipmentLargeSortOrder" SortOrder="None" />
                                                                    </GroupByFields>
                                                                </telerik:GridGroupByExpression>
                                                                <telerik:GridGroupByExpression>
                                                                    <SelectFields>
                                                                        <telerik:GridGroupByField FieldName="szEquipmentLargeName" FieldAlias="EquipmentLargeNameCount" />
                                                                        <telerik:GridGroupByField FieldName="szEquipmentLargeName" FieldAlias="EquipmentLargeName" />
                                                                    </SelectFields>
                                                                    <GroupByFields>
                                                                        <telerik:GridGroupByField FieldName="szEquipmentLargeName" />
                                                                    </GroupByFields>
                                                                </telerik:GridGroupByExpression>
                                                            </GroupByExpressions>
                                                            <GroupByExpressions>
                                                                <telerik:GridGroupByExpression>
                                                                    <SelectFields>
                                                                        <telerik:GridGroupByField FieldName="EquipmentMiddleSortOrder" FieldAlias="EquipmentMiddleSortOrderName" />
                                                                        <telerik:GridGroupByField FieldName="EquipmentMiddleSortOrder" FieldAlias="EquipmentMiddleSortOrderCount" />
                                                                    </SelectFields>
                                                                    <GroupByFields>
                                                                        <telerik:GridGroupByField FieldName="EquipmentMiddleSortOrder" SortOrder="None" />
                                                                    </GroupByFields>
                                                                </telerik:GridGroupByExpression>
                                                                <telerik:GridGroupByExpression>
                                                                    <SelectFields>
                                                                        <telerik:GridGroupByField FieldName="szEquipMiddleName" FieldAlias="EquipMiddleNameCount" />
                                                                        <telerik:GridGroupByField FieldName="szEquipMiddleName" FieldAlias="EquipMiddleName" />
                                                                    </SelectFields>
                                                                    <GroupByFields>
                                                                        <telerik:GridGroupByField FieldName="szEquipMiddleName" />
                                                                    </GroupByFields>
                                                                </telerik:GridGroupByExpression>
                                                            </GroupByExpressions>
                                                            <Columns>
                                                                <telerik:GridBoundColumn DataField="Id" FilterControlAltText="Filter column column"
                                                                    HeaderText="Id" UniqueName="Id" Visible="false">
                                                                    <HeaderStyle Width="30%" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="szEquipmentSmallName" FilterControlAltText="Filter column column"
                                                                    HtmlEncode="true" HeaderText="Equipment Small Name" UniqueName="szEquipmentSmallName">
                                                                    <HeaderStyle Width="30%" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="szEquipMiddleName" FilterControlAltText="Filter column column"
                                                                    HtmlEncode="true" HeaderText="Equip Middle Name" Visible="false" UniqueName="szEquipMiddleName">
                                                                    <HeaderStyle Width="30%" />
                                                                </telerik:GridBoundColumn>
                                                                <telerik:GridBoundColumn DataField="szEquipmentLargeName" FilterControlAltText="Filter column column"
                                                                    HtmlEncode="true" HeaderText="Equipment Large Name" Visible="false" UniqueName="szEquipmentLargeName">
                                                                    <HeaderStyle Width="30%" />
                                                                </telerik:GridBoundColumn>
                                                            </Columns>
                                                            <EditFormSettings>
                                                                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                                                </EditColumn>
                                                            </EditFormSettings>
                                                        </MasterTableView>
                                                        <FilterMenu EnableImageSprites="False">
                                                        </FilterMenu>
                                                        <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
                                                        </HeaderContextMenu>
                                                    </telerik:RadGrid>
                                                </div>
                                            </div>
                                        </td>
                                    </tr>
                                </table>
                                <table width="100%">
                                    <tr>
                                        <td align="right" style="padding-top: 6px">
                                            <telerik:RadButton ID="btn_OkEquipCate" runat="server" Text="Ok" Width="75px" OnClick="OkEquipCategory"
                                                OnClientClicking="window.scrollTo = function(x,y) { return true; }">
                                            </telerik:RadButton>
                                            &nbsp;
                                            <telerik:RadButton ID="btn_CancelEquipCate" runat="server" Text="Cancel" Width="75px"
                                                OnClick="CancelEquipCategory" OnClientClicking="window.scrollTo = function(x,y) { return true; }">
                                            </telerik:RadButton>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </telerik:RadAjaxPanel>
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>


0
Angel Petrov
Telerik team
answered on 10 Mar 2014, 09:07 AM
Hi Mayur,

Could you please remove the RadAjaxPanel from the ContentItemTemplate and tell us if the problem is resolved? Additionally please elaborate more on the steps that one must perform in order to observe the unwanted behavior.

Regards,
Angel Petrov
Telerik

DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

Tags
Ajax
Asked by
Mayur
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Mayur
Top achievements
Rank 1
Angel Petrov
Telerik team
Share this question
or