Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
183 views
I have a very basic question about RadAjaxManager that I was unable to answer yet. How to pass data back to the client-side response handler:

Client-side, I might do something like this:

RadAjaxManager1.ajaxRequest(arg);

Server-side, I then do something like this:

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
  string arg = e.Argument;
  // do something
}

Client-side, I then handle the response as so

function OnReponseEnd(sender, eventArgs)
{
}

My basic question is - how to pass data back to OnResponseEnd? What can I do server-side that will generate data that I can then process in OnResponseEnd? I'm more accustomed to doing ajax more bare-bones, like through jQuery, where I can pass params back and forth. I know I can add ResponseScripts server-side in order to pass data, but that's a bit clunky.

Thanks




Veli
Telerik team
 answered on 10 Jun 2010
1 answer
202 views
Hello, how can i configure the AllowedFileExtensions property to allow files having no file extension to be uploaded?  For example, i want to allow .jpg and .txt, and also any file that has no extension.  I have tried adding just ".", but it doesn't work.
Genady Sergeev
Telerik team
 answered on 10 Jun 2010
3 answers
357 views
hi, I use DialogOpener to open ImageManager directly
        Dim imageManagerParameters As New ImageManagerDialogParameters()  
        imageManagerParameters.MaxUploadFileSize = 1048576  
        imageManagerParameters.SearchPatterns = New String() {"*.jpg", "*.png", "*.gif"}  
        imageManagerParameters.FileBrowserContentProviderTypeName = GetType(wwwBaultar.RadEditorDBContentProvider).AssemblyQualifiedName  
        imageManagerParameters.ViewPaths = New String() {"ROOT/Images"}  
        imageManagerParameters.UploadPaths = New String() {"ROOT/Images"}  
        imageManagerParameters.DeletePaths = New String() {"ROOT/Images"}  
 
        Dim imageManager As New DialogDefinition(GetType(ImageManagerDialog), imageManagerParameters)  
        imageManager.ClientCallbackFunction = "ImageManagerFunction" 
        imageManager.Width = Unit.Pixel(694)  
        imageManager.Height = Unit.Pixel(440)  
 
        DialogOpener1.DialogDefinitions.Add("ImageManager", imageManager) 

That work great except if user click on the Image Editor I got this error:

Microsoft JScript runtime error: Sys.ArgumentNullException: Dialog Parameters for the ImageEditor dialog do not exist
Parameter name: dialogName

i see some post fot calling the image Editor directly but whats about calling inside the image manager ?
Thanks
Rumen
Telerik team
 answered on 10 Jun 2010
2 answers
582 views
Hello,

I have the following situation. A fixed height treeview (fixed number of items) and below a dynamic treeview with height set to 100%. Body with no scrolling, but scrolling on the treeview. It works just fine except that the 100% takes up 100% screenheight + height of top treeview. I know is is by design of the browsers, but was wondering if anyone might know a fix for it other than setting height clientside with javascript. To reproduce you can use the below code. Thanks in advance:

aspx page:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title></title>  
    <style type="text/css">  
        html, body, form  
        {  
            height: 100%;  
            margin: 0px;  
            padding: 0px;  
            overflow: hidden;  
            font-family: "Segoe UI" , Arial, Sans-serif;  
            font-size: 12px;  
        }  
    </style> 
</head> 
<body style="overflow: hidden;">  
    <form id="form1" runat="server">  
    <asp:ScriptManager ID="ScriptManager1" runat="server">  
    </asp:ScriptManager> 
    <table cellpadding="0" cellspacing="0" border="0" style="width: 99%; height: 100%;">  
        <tr style="vertical-align: top; height: 100%;">  
            <td style="width: 220px; height: 100%">  
                <telerik:RadTreeView ID="rtvBasis" runat="server" Skin="Default" Height="200" BorderColor="#FFFFFF" 
                    BackColor="#FFFFFF" BorderStyle="Solid" BorderWidth="1px">  
                    <DataBindings> 
                        <telerik:RadTreeNodeBinding ExpandedField="Expanded" /> 
                    </DataBindings> 
                </telerik:RadTreeView> 
                <div style="height: 100%; overflow-y: scroll;">  
                    <telerik:RadTreeView ID="rtvProjecten" runat="server" Skin="Default" EnableDragAndDrop="true" 
                        BorderColor="#FFFFFF" BackColor="#FFFFFF" BorderStyle="Solid" BorderWidth="1px" 
                        CausesValidation="false">  
                        <DataBindings> 
                            <telerik:RadTreeNodeBinding ExpandedField="Expanded" /> 
                        </DataBindings> 
                    </telerik:RadTreeView> 
                </div> 
            </td> 
        </tr> 
    </table> 
    </form> 
</body> 
</html> 
 


Codebehind to fill with data:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
public partial class _Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
        for(int i = 0; i < 5;i++)  
        {  
            RadTreeNode node = new RadTreeNode("item", i.ToString());  
            rtvBasis.Nodes.Add(node);  
        }  
        for (int i = 0; i < 100; i++)  
        {  
            RadTreeNode node = new RadTreeNode("item", i.ToString());  
            rtvProjecten.Nodes.Add(node);  
        }  
    }  
}  
 
Yeroon
Top achievements
Rank 2
 answered on 10 Jun 2010
1 answer
115 views
when I set the content property of the rad editor with content that has \r\n tags, </br> tags and other html tags,

the \r\n are stripped and the other html tags are displayed as it is in the rad editor.

I set the code like this,

RadEditor1.Content = encodedString;

in the rad grid I get the result as follows,

<pre> <h1>My First Heading</h1> <p>My first paragraph.</p> Dear Dr. <<Contributor's name>>, <br/> On behalf of the Primary Care Department at UpToDate, I would like to thank you for the work that youve done as an author for us. We are very appreciative of your contributions regarding the topic <<Title of topic>>. <br/> This letter follows several attempts we have made to get in touch with you about a very important disclosure request, which is a necessary piece of our editorial process. As you may know, we are accredited to provide CME to our subscribers. In order to maintain this accreditation, we must collect disclosure information from our authors on an annual basis. We have not received a <<previous year>> disclosure form from you, despite our attempts to contact you in this regard. <br/> In keeping with our editorial policy and CME guidelines, we are removing your name from our program as author on the <<Title of topic>> topic, beginning with version <<next version>> (to be released in <<month and year>>). <br/> Again, thank you very much for participating in the UpToDate program. </br> Sincerely, <<EA's name>> </pre>

the <Br/> tags are put as it is... and the there is no new lines generated even though the encoded string contains \r and \n


Can the Rad editor Understand HTML tags and render accordingly?

Thanks,
Ramesh

Rumen
Telerik team
 answered on 10 Jun 2010
1 answer
107 views
Hello,
  I use the telerik grid. I use  GridDropDownColumn for the boolean value. but when i want to set only once true & false value in dropdown
Princy
Top achievements
Rank 2
 answered on 10 Jun 2010
1 answer
119 views
Hello,

I Have  a TreeView with CheckBox and also a Context Menu, but I want to know if it's possible to have the context menu when right clicking on the CheckBox?

Thank's

Patrick
Veronica
Telerik team
 answered on 10 Jun 2010
1 answer
79 views
I have a radgrid in my application which is populated using the web method. Now I have to implement the Add/Edit /Delete options. I need the form template edit form to add/Edit. My question is 'Is it possible to perform add/edit in form template edit form using pagemethods ? '. I tried a lot but couldn't find any solution. In the client side edit (http://demos.telerik.com/aspnet-ajax/grid/examples/client/insertupdatedelete/defaultcs.aspx) the add/edit is in a separate form  Please help.

Thanks in advance.
Ajith.

Yavor
Telerik team
 answered on 10 Jun 2010
1 answer
158 views
I want to do couple of things.
  • want to align First/Prev/Nex/tLast links on right side.
  • want to show my own First/Prev/Nex/tLast images
  • Want to grey out these images i.e grey out First Image if current page is first one.
  • can specify space between 2 images. right now when i define images it gives lot of space between two images.
  • PagerTextFormat  is not working. It should come adjacent to pagination links.
 <PagerStyle Mode="NextPrev" PrevPageImageUrl="Img/sectControl_page-prev.gif" NextPageImageUrl="Img/sectControl_page-next.gif" LastPageImageUrl="Img/sectControl_page-last.gif"  FirstPageImageUrl="Img/sectControl_page-first.gif" Position="Top" PagerTextFormat="Items {2}-{3}(of {5})" ></PagerStyle>

Thanks,
Rohit
Yavor
Telerik team
 answered on 10 Jun 2010
1 answer
175 views
Dear Telerik,

We're facing 2 problems that can be reproduced on your demo site: http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx

A. Delete All in Chrome keeps HTML Tags
1) Open the above demo page Using IE (Internet Explorer 8)
2) Select all text found in the memo with Ctrl-A or through the Context menu
3) Press Delete to delete All
4) Click on the HTML view, you'll see NO HTML left
5) Repeat the above in Goggle Chrome (latest version 5.something)
6) Click on the HTML view, you'll see some HTML left:
<div style="text-align: center;"><br /> 
<br /> 
</div> 


B. New Lines as Paragraphs in Chrome Generates <br /> tags
1) Open the above demo page Using IE (Internet Explorer 8)
2) Select all text found in the memo with Ctrl-A or through the Context menu
3) Press Delete to delete All
4) Click on the Design view
5) Select New Lines as Paragraphs option on the side
4) Type 1 then press Enter 2 times then type 2
5) Click the Html view, you'll see:
<p>1</p> 
<p>&nbsp;</p> 
<p>2</p> 
6) Now Repeat the above in Goggle Chrome
7) Click on the HTML view, you'll see some HTML left, delete it, so you start with an empty editor
8) Click on the Design view
9) Select New Lines as Paragraphs option on the side
10) Type 1 then press Enter 2 times then type 2
11) Click the Html view, you'll see:
<p>1</p> 
<p><br /> 
</p> 
<p>2</p> 
The above 2 problems ares causing us some troubles because of the different behaviour between IE and Chrome.

Please advise on how to solve them.

Regards,
Salah A. Malaeb
TeknoBuild
Rumen
Telerik team
 answered on 10 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?