Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
304 views
I have hit the following scenario which I have managed to strip out in to a small example.  I have a radWindow that is opening a new aspx page.  On that page the user needs to cause a number of postbacks; after a certain number of postbacks are made and the window is closed by the user the parent page loses all state. Any subsequent postback on the parent page results in all dropdowns losing their data, it also sometimes occurs with textbox values.  This should explain it better:

This is the parent page:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function openRadWindow() {
        var oWnd = radopen("/parts/test.aspx", "RadWindow1");     
        oWnd.setSize(850, 700);
        oWnd.center();
    }
        </script>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
            </telerik:RadScriptManager>
       <asp:DropDownList ID="lstComponent" runat="server" />
        <asp:Button ID="btnReload" runat="server" OnClick="btnReload_Click" />
        <asp:Button ID="btnAddNew" runat="server" Text="Add New" OnClientClick="openRadWindow('', '', '', ''); return false;" CssClass="button small green" />
    <telerik:RadWindowManager ShowContentDuringLoad="false" EnableShadow="true" InitialBehaviors="Maximize"
    ID="RadWindowManager1" runat="server" Behaviors="Close" >
    </telerik:RadWindowManager>
    </form>
</body>
</html>

This is the code behind:
protected void Page_Load(object sender, EventArgs e)
       {
           if (!IsPostBack)
           {
               lstComponent.Items.Clear();
               lstComponent.Items.Insert(0, new ListItem(QA.BLL.Common.Const.please_select, String.Empty));
           }
       }

This is the page that is opened:
<!DOCTYPE html>
 
<head runat="server">
    <title></title>
     <script type="text/javascript">
         function CloseAndRebind(args) {
             //GetRadWindow().BrowserWindow.refreshGrid(args);
             GetRadWindow().close();
         }
 
         function GetRadWindow() {
             var oWindow = null;
             if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
             else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
 
             return oWindow;
         }
 
         function CancelEdit() {
             GetRadWindow().close();
         }
 
</script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
         <asp:Button ID="Button1" runat="server" Text="Nothing" OnClick="Button1_Click" />
    <asp:Button ID="btnTest" runat="server" OnClick="btnTest_Click" />
    </div>
    </form>
</body>
</html>

And its code behind:

public partial class test : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
 
        }
 
        protected void btnTest_Click(object sender, EventArgs e)
        {
            int test = 1;
            Page.ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "CloseAndRebind('Rebind');", true);
        }
 
        protected void Button1_Click(object sender, EventArgs e)
        {
            btnTest.Text = DateTime.Now.ToShortTimeString();
        }
    }

Now to make the issue occur perform the following steps:
  1.  press the btnAddNew button on the parent page to make the window appear
  2. on the window press Button1 a number of times (x10)
  3. Press the btnTest button to close the window
  4. Press the btnReload button on the parent page to force a postback
  5. The option that had been added to the dropdown is gone.

This is a simplistic example but my parent page in my actual website has a number of dropdown controls all of which lose their state.

I am using version 2012.1.215.40. 

Thanks,
Richard
Marin Bratanov
Telerik team
 answered on 14 Mar 2013
3 answers
57 views
hello,
 if i use in my web page this radwindow:
<telerik:RadWindow ID="RadWindowCard" runat="server" AutoSize="true" IconUrl="/image/iconlogo.png"
ReloadOnShow="True" NavigateUrl="publicard.aspx" Behaviors="Close" RestrictionZoneID="NavigateUrlZone"
Height="100" Skin="Office2010Silver" VisibleStatusbar="false" Title="Caricamento biglietto da visita..."
ShowContentDuringLoad="False" Width="300" Modal="true"
KeepInScreenBounds="true" Style="z-index: 8000">
</telerik:RadWindow>
 
the datapager does not work anymore. that is, the DataPager no longer avanto or back pages ... not compatible? or where am I wrong? Here is the html code of my page:

<form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="ImageButtonRicerca">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="Panel1"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="RadListView1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadWindowCard"
                            LoadingPanelID="RadAjaxLoadingPanel1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        <asp:HiddenField ID="_search" runat="server" /><asp:HiddenField ID="_search1" runat="server" />
        <telerik:RadWindow ID="RadWindowCard" runat="server" AutoSize="true" IconUrl="/image/iconlogo.png"
            ReloadOnShow="True" NavigateUrl="publicard.aspx" Behaviors="Close" RestrictionZoneID="NavigateUrlZone"
            Height="100" Skin="Office2010Silver" VisibleStatusbar="false" Title="Caricamento biglietto da visita..."
            ShowContentDuringLoad="False" Width="300" Modal="true"
            KeepInScreenBounds="true" Style="z-index: 8000">
        </telerik:RadWindow>
        <telerik:RadFormDecorator ID="RadFormDecorator" Runat="server"
            DecoratedControls="Default, Textbox, Textarea, Label, H4H5H6, Select, Zone, GridFormDetailsViews, ValidationSummary, LoginControls"
            Skin="Sunset" />
        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
            BorderColor="#D5842B" BorderStyle="Double" BorderWidth="1px" Skin="Simple">
        </telerik:RadAjaxLoadingPanel>
            <div align="center" class="backgroundup">
                <div align="center" class="banner">
                    <div style="padding-left:200px;">
                        <div class="profilesearch">
                            <asp:Panel ID="Panel1" runat="server" DefaultButton="ImageButtonRicerca" Height="55px" Width="685">
                                <div id="txt1" style="width:350px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
                                    <telerik:RadTextBox ID="Txt_ricerca1" Runat="server"
                                    EmptyMessage="Nominativo o azienda o categoria" Width="350px" Height="22px" Skin="" Font-Italic="True"
                                    Font-Names="Verdana">
                                    <EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
                                    <HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
                                    </telerik:RadTextBox>
                                </div>
                                <div id="txt2" style="width:250px; height:22px; border:0px; margin:0px; padding-top:15px; padding-right:1px; float:left">
                                    <telerik:RadTextBox ID="txt_ricerca2" runat="server"
                                    EmptyMessage="Città di residenza" Width="250px" Height="22px" Skin=""
                                    Font-Italic="True" Font-Names="Verdana">
                                    <EmptyMessageStyle ForeColor="Gray" Font-Italic="True" Font-Names="Verdana" />
                                    <HoveredStyle Font-Italic="True" Font-Names="Verdana" ForeColor="#993300" />
                                    </telerik:RadTextBox>
                                </div>
                                <div id="btn" style="width:80px; height:40px; border:0px; margin:0px; padding-top:7px; float:right">
                                    <asp:ImageButton ID="ImageButtonRicerca" runat="server" ImageUrl="~/Image/cerca.png" />
                                </div>
                            </asp:Panel>
                        </div>
                    </div>
                    <div id="menu" class="divresultmenu">
                        <div id="lbresult" class="lbresult">
                            <asp:Label ID="Label1" runat="server" Text="Biglietti da visita trovati:"
                            style="font-size: small; font-family: Verdana"></asp:Label>
                        </div> <!-- end div lbresult -->
                        <div class="divbuttonmenu">
                            <telerik:RadButton ID="btnhome" runat="server" Text="Home page">
                            </telerik:RadButton>
                            <telerik:RadButton ID="btnreg" runat="server" Text="Registrati in trycontact">
                            </telerik:RadButton>
                        </div>
                    </div> <!-- end div menu -->
                    <div class="resultseparator">
                    </div> <!-- end div separator -->
                    <asp:Panel ID="PanelRadlist" runat="server" Width="700px">
                    <div id="div_radlistview" class="divradlistview">
                        <telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente"
                            ItemPlaceholderID="Contenitore" AllowPaging="True"
                            Width="650px" OnNeedDataSource="RadListView1_NeedDataSource">
                                <LayoutTemplate>
                                    <fieldset style="width: 700px; border:0px" id="FieldSet1">
                                        <legend></legend>
                                        <asp:Panel ID="Contenitore" runat="server">
                                        </asp:Panel>
                                        <telerik:RadDataPager ID="RadDataPager1" runat="server"
                                            PagedControlID="RadListView1" Width="700px" Culture="it-IT" BackColor ="#ecede5">
                                                <Fields>
                                                    <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
                                                    <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                                                </Fields>
                                        </telerik:RadDataPager>
                                    </fieldset>
                                </LayoutTemplate>
                                <ItemTemplate>
                                    <div class="item">
                                        <div class="image">
                                            <asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
                                        </div>
                                    <div class="content">
                                        <div class="user">
                                            <b><%# CType(Container.DataItem, PropertyUtente).utente%></b>
                                        </div>
                                        <div class="description_category">
                                            Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
                                        </div>
                                        <div class="description_city">
                                            Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div>
                                        <div class="description_phone">
                                            Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div>                                       
                                        <div class="description_email">
                                            Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
                                        </div>
                                        <div class="item_button">
                                            <telerik:RadButton ID="RadButton1" runat="server" Text="Biglietto completo" Width="150px"
                                            OnClick="RadButton1_Click">
                                            <Icon PrimaryIconCssClass="rbOpen"></Icon>
                                            </telerik:RadButton>
                                        </div>                                                                              
                                    </div>
                                    </div>
                                </ItemTemplate>
                        </telerik:RadListView>
                    </div> <!-- end div radlist -->
                    </asp:Panel>
                </div> <!-- end div banner -->
            </div<!-- end div background -->
     </div>
    </form>





Marin Bratanov
Telerik team
 answered on 14 Mar 2013
1 answer
124 views
Hi All,

I've a portal page which consists of multiple portlet. Each portlet will load different data individually and asynchronously. Now I use asp.net timer to perform the update. But I found that when a portlet start to perform update and manual interaction with other portlet will interrupt the auto update. How can I solve this problem?

Thanks,
Gary
Dobromir
Telerik team
 answered on 14 Mar 2013
3 answers
145 views
Since our upgrade to Sharepoint 2010 both editors now show up when attempting to edit and content. See attached. What needs to be done to only show the Telerik editor?
Stanimir
Telerik team
 answered on 14 Mar 2013
5 answers
162 views
Is there a planned future to include PDF417 and 2D barcodes?
Vasil
Telerik team
 answered on 14 Mar 2013
1 answer
830 views
I added the Radtreeview to asp:content and got this error msg. But if I added the RadTreeview to the following:

<

 

body>

 

 

<form id="form1" runat="server">

 

 

<div>

 

 

 

<telerik:RadTreeView ID="RadTreeView1" runat="server">

 

 

</telerik:RadTreeView>

 

 

 

</div>

 

 

</form>

 

</

 

body>

no error message. Did anybody have similar issue before? thanks

 

Kate
Telerik team
 answered on 14 Mar 2013
5 answers
462 views
Hi Folks can anyone let me know how to access the RadgridFooteritem in a function like

function foo()

{
how to access the RadgridFooteritem????
}

Awaiting for your reply.


Thanks
Satya
kollam2003
Top achievements
Rank 1
 answered on 14 Mar 2013
3 answers
123 views
i've a drop down list called  ("DropDownList4") i want to make check if it's contain value the edit button is disappeared if n\t it will appear to choose from it .
             

Kostadin
Telerik team
 answered on 14 Mar 2013
4 answers
229 views
i want to hide the update button if the row was updated ,
just want to update one time only
Mohamed El-Sayed
Top achievements
Rank 1
 answered on 14 Mar 2013
1 answer
174 views
Hi there,

I hope someone can help me. I have a problem with RadGrid after I install latest Telerik ASP.NET AJAX controls Q1 2013. The code now return &nbsp; values when I select a row. Before the upgrade everything works perfectly.

The code :

ASPX
<telerik:RadGrid ID="ChangeProjectGrid" runat="server" AllowFilteringByColumn="True"
            AllowSorting="True" Font-Bold="False" Font-Italic="False" Font-Overline="False"
            Font-Size="XX-Small" Font-Strikeout="False" Font-Underline="False" GridLines="None"
            EnableLinqExpressions="False" AutoGenerateColumns="False">
            <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" ReorderColumnsOnClient="True"
                EnableRowHoverStyle="True">
                <Scrolling AllowScroll="True" />
            </ClientSettings>
            <MasterTableView AllowMultiColumnSorting="True">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <telerik:GridBoundColumn DataField="IDProject" FilterControlAltText="Filter IDProject column"
                        UniqueName="IDProject" Visible="False">
                    </telerik:GridBoundColumn>
                        <telerik:GridCheckBoxColumn UniqueName="Active" AllowFiltering="true" AllowSorting="true"
                        DataField="Active" DataType="System.Boolean" HeaderText="Is Active" HeaderStyle-Wrap="false">
                    </telerik:GridCheckBoxColumn>
                    <telerik:GridBoundColumn DataField="ProjectAcronym" FilterControlAltText="Filter ProjectAcronym column"
                        HeaderText="Project Acronym" UniqueName="ProjectAcronym" ReadOnly="True">
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                        <ItemStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ProjectTitle" FilterControlAltText="Filter ProjectTitle column"
                        HeaderText="Project Title" UniqueName="ProjectTitle" ReadOnly="True">
                        <HeaderStyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False"
                            Font-Underline="False" Wrap="False" />
                    </telerik:GridBoundColumn>
                           </Columns>
                <EditFormSettings>
                    <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                    </EditColumn>
                </EditFormSettings>
            </MasterTableView>
            <FilterMenu EnableImageSprites="False">
            </FilterMenu>
            <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
            </HeaderContextMenu>
        </telerik:RadGrid>

Code behind

Protected Sub ChangeProjectGrid_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles ChangeProjectGrid.ItemCommand
 
       If TypeOf e.Item Is GridDataItem Then
 
            Try
                Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)
                Dim ts As EfamtPlus.TrenutnaSeja
                
                Dim str As String = dataItem("IDProject").Text
               ' code returns empty (& nbsp;) value - on the old telerik controls returns numeric value
            Catch ex As ThreadAbortException
                ' ne naredi nič
 
            Catch ex As Exception
                PublishException(ex)
                Response.Redirect(NapakaUrl, RedirectParameter)
 
            Finally
                ClientScript.RegisterStartupScript(Page.GetType(), "closeWindow", "<script type='text/javascript'>RefreshParentPageAndClose()</script>")
            End Try
 
        End If
    End Sub

I tried to find similar problem on this forum, goole it, but just coudnt find any so if someone could help me i would be very grateful.

Thanks all in the advance.
Janez Kalan
Andrey
Telerik team
 answered on 14 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?