Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
159 views
Hello Experts,
  My Senario : I have opened RadWindow from javascript,when i click on Close (x) button,it should refresh the parent page.
How to accomplish this.

     I have opened the RadWindow from javascript like the following:
      <script type="text/javascript">
      
      function EditList(CustomerID, ID) {
       // window.RadOpen("CustomerResults.aspx?CustomerID=" + CustomerID + "ID=" + ID);
        
       var oManager = window.radopen("CustomerResults.aspx?CustomerID=" + CustomerID + "&ID=" + ID, "RadEditWindow");
     
       oManager.setSize(900,500); //Width, Height
       oManager.center();
       //oManager.ReloadOnShow = true;
       oManager.set_reloadOnShow(true);
       oManager.set_showContentDuringLoad(true);
     // oWnd.set_title(Title);
       

        return false;
    }
  </script>

Following is the Design Page
---------------------------------------
 <script type="text/javascript">
      
      function EditList(CustomerID, ID) {
       // window.RadOpen("CustomerResults.aspx?CustomerID=" + CustomerID + "ID=" + ID);
        
       var oManager = window.radopen("CustomerResults.aspx?CustomerID=" + CustomerID + "&ID=" + ID, "RadEditWindow");
     
       oManager.setSize(900,500); //Width, Height
       oManager.center();
       //oManager.ReloadOnShow = true;
       oManager.set_reloadOnShow(true);
       oManager.set_showContentDuringLoad(true);
     // oWnd.set_title(Title);
       

        return false;
    }
  </script>


<script type="text/javascript">
    function RefreshParentPage() {
         //GetRadWindow().BrowserWindow.location.reload();
        top.location.href = top.location.href;

    }
</script>

      
 <asp:GridView ID="GvProp" runat="server" OnRowDataBound="GvProp_OnRowDataBound">
 <Columns>    
 <asp:TemplateField>
 <ItemTemplate>
 <asp:LinkButton ID="lbtMore" runat="server" Text="Edit"></asp:LinkButton>
 </ItemTemplate>
 </asp:TemplateField>
       </Columns>
 </asp:GridView>
 
      <telerik:RadWindow ID="RadEditWindow" runat="server" Height="500px" Width="900px"
            EnableShadow="true"  VisibleOnPageLoad="false" VisibleStatusbar="false"  Title="Matched Properties"
            ShowContentDuringLoad="false" Behaviors="Close,Pin" ReloadOnShow="true" OnClientClose="RefreshParentPage"
          NavigateUrl='<%# String.Format("CustomerResults.aspx?CustomerID={0}", _CustomerIDs) %>'> <%--OpenerElementID="btnRunMatch"--%>
      </telerik:RadWindow>    


Here is the Code Behind Page:
--------------------------------------------
 protected void GvProp_OnRowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {

                       
                        lbtMores.Attributes["href"] = "#";
                        lbtMores.Attributes["onclick"] = String.Format("return EditList('{0}','{1}');", _CustomerID, rowData.ID);
                        lbtMores.Visible = true;
                        RadEditWindow.OnClientClose = "RefreshParentPage";
                   
            }
        }

Thanks in Advance.

msigman
Top achievements
Rank 2
 answered on 22 May 2013
1 answer
414 views
In the Master Page of my ASP.NET 4.0 project I have this code:

<form id="form1" runat="server">
  <%-- Note: The 'AsyncPostBackTimeOut' value was added to try to increase the timeout during debugging; the value is in seconds --%>
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true" EnablePageMethods="true" AsyncPostBackTimeout="300">
    <Scripts>
      <%-- Note: In order to get jQuery Intellisense working, this procedure had to be followed: http://www.telerik.com/help/aspnet-ajax/introduction-jquery-intellisense.html --%>
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
      <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
 
      <asp:ScriptReference Path="~/Javascript/tools-1.0.1.js" />
      <asp:ScriptReference Path="~/Javascript/common-1.0.1.js" />
    </Scripts>
  </asp:ScriptManager>

Is there any known issue/bug that would prevent those two external Javascript files from being loaded properly each & every time?  Specifically, I'm wondering if anything about the way I'm loading the jQuery files via the Telerik DLL would prevent my own custom Javascript files from being loaded?

I ask because within "common-1.0.1.js" I have 3 related AJAX Request Handlers that are consistently not being loaded when the user starts my app in IE9.  Only after the user presses Ctrl-F5 does the code become active.

Any ideas how to fix this?

Robert

msigman
Top achievements
Rank 2
 answered on 22 May 2013
2 answers
93 views
good afternoon
I have and issue closing a radwindow with javascript
I'm using:
<script type="text/javascript">
           function GetRadWindow() {
               var oWindow = null;
               if (window.radWindow) oWindow = window.radWindow;
               else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
               return oWindow;
           }
 
           function Close() {
               GetRadWindow().close();
           }
 
       </script>
Which I know it works because when I put the code below in a button it closes the radwindow
ClientScript.RegisterStartupScript(Me.GetType(), "", "Close();", True)

my problem is that I have a toolbar with a button running the above code, it only refreses the content which in the radwindow but it doesnt close the radwindow (the toolbar is inside a radsliding panel). Please help.
Thanks
Steven
Top achievements
Rank 1
 answered on 22 May 2013
3 answers
159 views
Hi,

I am testing the radasyncupload - but have run into a small issue.

Is it possible to have the radasyncupload upload files automatically - so it doesn't wait for a postback ?

As it is now files are files first copied from temp files to the correct location when I push a submit button.

Best regards
Claus

Claus
Top achievements
Rank 1
 answered on 22 May 2013
2 answers
95 views
Hi all ,
    I'm using a List<myclass> as the datasource of RadGrid1 ,
    I just handled  SelectedIndexChanged event , but i don't know how to get the cell values of the selected row,
    I just used RadGrid1.datasource = new List<myclass>(.....) ;

    and don't binding some fileds.  i'm new to telerik. Could you please show me some helpful codes?

    Any help will be much appreciated.

Best Regards,
        Qing

Qingyang
Top achievements
Rank 1
 answered on 22 May 2013
11 answers
362 views
Hi,

The example Multiple comboboxes in in-place edit post does not work with the 2008 Q1 version of the ASP.Net Ajax controls. Can you please suggest a way to achieve this functionality.

Thanks
Tim
Top achievements
Rank 1
 answered on 22 May 2013
4 answers
88 views
Hi,

I am trying to display header text in two lines. The first line will have the code and the second line will be description. In order to force the description in second row, I inserted <br> tag between code and description. so my headertext would be something like "MSFT<br>Microsoft". The header text is displayed correctly in the grid. But it breaks when I try to export the grid to pdf. I read in the documentation that we cannot have "<", ">" or any other invalid XHTMl tags. so my question is how can I display the header text in two lines and still be able to export to pdf? Is there any other valid xhtml tag that I can use?

Thanks,
sridhar.
Daniel
Telerik team
 answered on 22 May 2013
13 answers
4.1K+ views
All,

I have a delete button inside a RadAjaxPanel:

<asp:Button id="btnDelete" Text="Delete" OnClientClick="return confirm('Are you sure you want delete this?');" runat="server"/>

The js popup is working, but it is not running the server-side click event attached to button.  Take away the OnClientClick, the server-side event runs fine.

What am I doing wrong?

Cheers,
Dave
Elias
Top achievements
Rank 2
 answered on 22 May 2013
10 answers
578 views
Hello

I've the following Grid Template Column

<telerik:GridTemplateColumn UniqueName="TemplateColumn">
<ItemTemplate>
      <div class="divPopularGridTags">
         <%# Convert.ToString(Eval("Tags"))%>
      </div>
</ItemTemplate>
</telerik:GridTemplateColumn>

In the tags datafield i may get a single tag or multiple tags (separated by spaces). Eg. sports, sports cricket, sports cricket sachin etc.

For each tag i need to create a link button which when clicked will take it to a different page. How can i dynamically do that?

I've trapped GridCreated client side event of RadGrid and i've written the following JQuery function to dynamically build the controls.

function RadGridPopular_GridCreated(sender, args)
{
    $(".divPopularGridTags").each(function()
    {
        var tagsText = $(this)[0].innerText;
        var tags = tagsText.split(' ');
        var innerContent = '';
         
        if(tags.length > 2)
        {
            $.each(tags, function(){
                //generate random number to set it to ID
                var randomNum = Math.floor(Math.random()*2);
                var ranNumberString = randomNum + '';
                innerContent = innerContent + "<asp:LinkButton CommandName='tagPopular" + $(this) +"' ToolTip='Tag' runat='server' ID='aspLinkPopularBookmarkTag' CssClass='popularbookmarkTag' onmouseover='popBookmarkTagMouseOver(this)' onmouseout='popBookmarkTagMouseOut(this)'/> ";                       
            });
        }
        else
        {
            innerContent = innerContent + "<a href='#'>" + tags[0]+ "</a>"
        }
         
        this.innerText = '';
        this.innerHTML = innerContent;
    });
     
}

But i get the following error

Control 'aspLinkPopularBookmarkTag' of type 'LinkButton' must be placed inside a form tag with runat=server.   at System.Web.UI.Page.VerifyRenderingInServerForm(Control control)
   at System.Web.UI.WebControls.LinkButton.AddAttributesToRender(HtmlTextWriter writer)

Any ideas how can i achieve this?

Regards
Raghavendra
Harry
Top achievements
Rank 1
 answered on 22 May 2013
3 answers
170 views
Can anyone suggest a way of scrubbing the comments content created by rad editor without loading the content in Rad Editor and using the built-in Remove All toolbar button? Ideally this would be done server-side on some piece of content.
Elliott
Top achievements
Rank 2
 answered on 22 May 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?