Telerik Forums
UI for ASP.NET AJAX Forum
13 answers
292 views
Hello,

I try to get decorated DropDownList value after change.
I'm using jQuery to add event like this

var select = $('#<%= ddlControl.ClinetID %>');
select.change(function() {
    alert($(this).val());
});

event is trigered correctly, but value is always 0. I did also inspect <select> in DOM inspector, and there is also always value = 0.

So, how to get this value if it's not changing?

Gr,
Pawel
Georgi Tunev
Telerik team
 answered on 12 Nov 2009
1 answer
107 views
Everytime that we click an image button inside an RadAjaxPanel in Firefox we get the same error:

"Input string was not in a correct format."

And the event onClick is not executed

In IE works fine.

We are using Q3 2009.

Thanks,

Ricard.
Sebastian
Telerik team
 answered on 12 Nov 2009
6 answers
140 views

Hello Everyone; this is Harshad; & Im completely new to Telerik Family!!... (In fact I'm completely new to the World of Web Development, so I might ask few stupid questions out here....  ;D !!)..

Alright; so; currently I'm working on to develop a Web Application for Shop-Floor Scheduling Software, where in one can view the task allocated for either an employee or a machine.

I'm thinking of taking Telerik Scheduler as a main tool for Drawing the required Gantts of the task. But Gantts being the basic & the most important feature of application I need a tool which Very easy to operate & very much flexible as my Task Start & End Time Calculations are going to be fine tuned to Minute level & most important I need a stable tool.

Please advice me whether I should continue using Telerik Scheduler control or not.


Thanks & Regards
T. Tsonev
Telerik team
 answered on 12 Nov 2009
1 answer
142 views
Hi

I have one Editor.aspx page which contains Rad Editor and Button. I write some text in editor (ex: Text will come here) and put the cursor some where in between ("come" and "here").
Now I click on Button which will open Popup contains Images. I will select Image from popup and will close pop up. once I close popup my original page Editor.aspx will get refreshed again and will call onClientLoad function of editor again.

Now on that page I still get my corsor position in number (ex: 14 as per above case). but I want to know how can I insert text/html at position 14. ?

It can add first image correctly. But when I am trying to add another image in same editor using same process mentioned above , it breakes my existing image code and thats why I am not getting my previous image.

Do you have any inbuild function for editor, so I can pass possition and add text/html at that position.
my code :

 

<telerik:RadEditor ID="RadEditor1" runat="server" Height="600px" ImageManager-EnableImageEditor="false" 
 AllowScripts="true" OnClientLoad="InsertText"></telerik:RadEditor>
<asp:Button ID="Button1" runat="server" Text="Image Gallery AJAX" OnClick="Button1_Click"/>
< script type="text/javascript">
 function InsertText()
 {
var intCPos = GetCursorPosition();
 if (intCPos != 0)
 {

     document.getElementById('hfCPOS').value = intCPos;
}

if(document.getElementById('myValue').value != "")
{
var pos = document.getElementById('hfCPOS').value; //gives 14
 var editorr = $find("<%=RadEditor1.ClientID%>"); //get a reference to the editor
 var strIMG = document.getElementById('myValue').value; // myvalue = <img id='123' src='123.gif' alt=''/>
 var strValue = editorr.get_html(true);
 strValue = strValue.substring(0,pos)+ strIMG + strValue.substring(pos)
//editorr.pasteHtml(strValue);
 
editorr.set_html(strValue);
 document.getElementById('myValue).value = "";
 document.getElementById('hfCPOS').value = "";
 }

}
 </script>

o/p (after adding 1st image)
Text Will Come<img alt="" id="parts_coupon_01.jpg" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//parts_coupon_01.jpg" runat="server" /> Here.

o/p (after adding 2nd image)
now my cursor is between "Text Will Come Here " - 'e' and 'r' of Here
Text Will Come<im<img id="service_coupon_02.jpg" runat="server" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//service_coupon_02.jpg" />g alt="" id="parts_coupon_01.jpg" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//parts_coupon_01.jpg" runat="server" /&gt; Here.

it breaks my code. need help!!!!!!

thanks
DIpsa

 

 

 

Rumen
Telerik team
 answered on 12 Nov 2009
1 answer
81 views
Hi

When I upgraded to the latest version (2009.3.1103.35) I started getting JavaScript errors in some of my pages

I realized that the problem is with the get_value() method because it is returning a null when no value is selected whereas it used to return a blank string before

Of course I can fix my code around this problem but I wish there would not be such changes in the future

Thanks
Simon
Telerik team
 answered on 12 Nov 2009
1 answer
230 views
Hi

I have one Editor.aspx page which contains Rad Editor and Button. I write some text in editor (ex: Text will come here) and put the cursor some where in between ("come" and "here").
Now I click on Button which will open Popup contains Images. I will select Image from popup and will close pop up. once I close popup my original page Editor.aspx will get refreshed again and will call onClientLoad function of editor again.

Now on that page I still get my corsor position in number (ex: 14 as per above case). but I want to know how can I insert text/html at position 14. ?

It can add first image correctly. But when I am trying to add another image in same editor using same process mentioned above , it breakes my existing image code and thats why I am not getting my previous image.

Do you have any inbuild function for editor, so I can pass possition and add text/html at that position.
my code :

 

<telerik:RadEditor ID="RadEditor1" runat="server" Height="600px" ImageManager-EnableImageEditor="false" 
 AllowScripts="true" OnClientLoad="InsertText"></telerik:RadEditor>
<asp:Button ID="Button1" runat="server" Text="Image Gallery AJAX" OnClick="Button1_Click"/>
< script type="text/javascript">
 function InsertText()
 {
var intCPos = GetCursorPosition();
 if (intCPos != 0)
 {

     document.getElementById('hfCPOS').value = intCPos;
}

if(document.getElementById('myValue').value != "")
{
var pos = document.getElementById('hfCPOS').value; //gives 14
 var editorr = $find("<%=RadEditor1.ClientID%>"); //get a reference to the editor
 var strIMG = document.getElementById('myValue').value; // myvalue = <img id='123' src='123.gif' alt=''/>
 var strValue = editorr.get_html(true);
 strValue = strValue.substring(0,pos)+ strIMG + strValue.substring(pos)
//editorr.pasteHtml(strValue);
 
editorr.set_html(strValue);
 document.getElementById('myValue).value = "";
 document.getElementById('hfCPOS').value = "";
 }

}
 </script>

o/p (after adding 1st image)
Text Will Come<img alt="" id="parts_coupon_01.jpg" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//parts_coupon_01.jpg" runat="server" /> Here.

o/p (after adding 2nd image)
now my cursor is between "Text Will Come Here " - 'e' and 'r' of Here
Text Will Come<im<img id="service_coupon_02.jpg" runat="server" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//service_coupon_02.jpg" />g alt="" id="parts_coupon_01.jpg" src="http://192.168.3.27:88/Files/Images/2/gallery/Coupons//parts_coupon_01.jpg" runat="server" /&gt; Here.

it breaks my code. need help!!!!!!

thanks
DIpsa

 

 

 

 

 

 

Rumen
Telerik team
 answered on 12 Nov 2009
2 answers
107 views
Hi All,

I have huge number of columns in a table i am binding them to grid. how to show all the columns in the same screen without scrolling, i mean splitting a record in to multiple rows.

Can we do it using telerik rad grid, Please help me regarding this.
pradeep k
Top achievements
Rank 1
 answered on 12 Nov 2009
0 answers
128 views

 

i hav a document in microsoft word document(like a form).i want to fill this document from sql table.....how can i do this??????

plz reply

pradeep baloni
Top achievements
Rank 1
 asked on 12 Nov 2009
6 answers
171 views
We are still using the old, ASP.NET, non-AJAXified verison of the RadEditor (due to issues we have with getting the newer version to appear correctly on our website's pages).  There are a couple of things I'd like to do that seem from the forums only to be do-able via the Telerik control's javascript libraries, but I'm having trouble figuring out how to use those in the old version of the tool (where the libraries were not consolidated and accessible via the $ symbol as they are post-Prometheus release).  Here's what I'm looking to do:

1) Check the length of strings being entered into the control, and limit the length to a set number of characters (including the HTML markup) (or, even more ideally, but maybe harder - not limit the allowed length, but detect it and show a warning if a set length is exceeded - but not with a popup but rather by just updating text of a control on the page to show the warning / not show the warning on paste and keystroke).  I see the post at   http://www.telerik.com/community/forums/aspnet-ajax/editor/maximum-text-length.aspx , but it depends on the $ javascript library

2) Capture the paste event and pop up a window offering to strip ALL formatting from the pasted content (not just MS Word formatting), and based on the user's choice either leave the pasted content intact or strip all.  I see the posts on this that point to 

Telerik.Web.DomElement.addExternalHandler as the javascript library to call (pre the introduction of the $ library), but when I try to call this, I get a popup saying "Exception while executing client event "OnClientLoad" Error: 'Telerik' is undefined."  so basically I'm not referencing the library right, but I'm not sure how to do so correctly. 

Many thanks for your aid!

FYI, Here's the code for my test application page that throws the exception cited above:
 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TelerikTest2._Default" %> 
<%@ Register TagPrefix="telerik" Namespace="Telerik.WebControls" Assembly="RadEditor.Net2" %> 
 
<!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>  
</head> 
<body> 
    <form id="form1" runat="server">  
    <div> 
      
    <script type="text/javascript">  
    function OnClientLoad(editor, args)  
    {  
        var element = document.all;  
        Telerik.Web.DomElement.addExternalHandler(element, "paste", function(e) {  
            window.setTimeout(function() {  
                //write here your code which you want to execute when the paste event is fired  
                //after that execute the editor's clean filters  
                var oSelElem = editor.get_html();  
                alert(oSelElem);  
                editor.fire("SelectAll");  
                editor.fire("FormatStripper", { value: "FONT" });  
                editor.fire("FormatStripper", { value: "SPAN" });  
                editor.fire("FormatStripper", { value: "CSS" });  
                alert(editor.get_html());  
                alert(oSelElem);  
            }, 300);  
        });  
    }  
    </script> 
 
    <telerik:radeditor runat="server" ID="RadEditor1" OnClientLoad="OnClientLoad"  StripFormattingOptions="NonesupressCleanMessage">  
    </telerik:radeditor> 
    </div> 
    </form> 
</body> 
</html> 
 

Rumen
Telerik team
 answered on 12 Nov 2009
3 answers
100 views
I want to make a context menu for image like here:
http://demos.telerik.com/aspnet-ajax/editor/examples/builtinmodules/defaultcs.aspx

But when I add EditorTool Name="ImageEditor" I have an alert:
"the command ImageEditor is not implemented yet"

What I'm doing wrong?
I have simple RadEditor.


Grzesiek
Top achievements
Rank 2
Iron
 answered on 12 Nov 2009
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?