Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
275 views
I have a RadGrid with a User Control (.ascx page) used as a pop up Insert/Edit form. I want to do some custom validation on the form but the javascript never runs. I looked at the source code of the page after it loaded and the script I wrote isn't even there. How can I make this work?

<script language="javascript" type="text/javascript">  
    function ValidateNumber(txt) {  
        alert("Entries must be numeric!");  
        } 
<asp:TextBox ID="txtHours4" onchange="ValidateNumber(this)"  runat="server"></asp:TextBox>
Martin
Telerik team
 answered on 13 Jan 2010
6 answers
248 views
I'm attempting to create resources via client-side code. I've tried several approaches and I'm not certain why they haven't worked.

First. I tried creating a web method that returned a Telerik.Web.UI.Resource object:

    [WebMethod] 
    public static Telerik.Web.UI.Resource GetResource() 
    { 
        Telerik.Web.UI.Resource r1 = new Telerik.Web.UI.Resource("Employee", "100", "Frank Sminth"); 
        return r1; 
    } 
 

and then using this method per the documentation:

 $("#AddResource").click(function() { 
                                var scheduler = $find("<%=RadScheduler1.ClientID %>"); 
                                if (scheduler == null) alert("No Control"); 
                                $.ajax({ 
                                    type: "POST", 
                                    url: "Default.aspx/GetResource", 
                                    data: "{}", 
                                    contentType: "application/json; charset=utf8", 
                                    dataType: "json", 
                                    success: function(r1) { 
                                        scheduler.SchedulerResourceCollection.add(r1); 
                                        scheduler.Rebind(); 
                                        alert("OK"); 
                                    } 
                                }); 
                            }); 

However, the alert is never executed and the resource doesn't appear.

I've also tried creating an entire collection of resources and passing them back:

    [WebMethod] 
    public static Telerik.Web.UI.ResourceCollection GetResource() 
    { 
        Telerik.Web.UI.ResourceCollection rc = new Telerik.Web.UI.ResourceCollection(); 
        Telerik.Web.UI.Resource r1 = new Telerik.Web.UI.Resource("Employee", "100", "Frank Sminth"); 
        rc.Add(r1); 
        return rc; 
    } 

And here is the JavaScript code to display the resource:
$("#AddResource").click(function() { 
                                var resource = new Telerik.Web.UI.SchedulerResource(); 
                                var scheduler = $find("<%=RadScheduler1.ClientID %>"); 
                                if (scheduler == null) alert("No Control"); 
                                $.ajax({ 
                                    type: "POST", 
                                    url: "Default.aspx/GetResource", 
                                    data: "{}", 
                                    contentType: "application/json; charset=utf8", 
                                    dataType: "json", 
                                    success: function(rc) { 
                                        scheduler.set_resources(rc); 
                                        alert("OK"); 
                                    } 
                                }); 
                              }); 

  But this isn't working either.

So, I'm looking for two things.  FIrst, an explanation on how to add a resource via client-side code.  And secondly, where can I find some good documentation for the client-side methods.  The help file that get's shipped with the controls is rather...thin,

Thanks much!

Mark Galbreath
Top achievements
Rank 2
 answered on 13 Jan 2010
1 answer
142 views
I would like attach a event to the textbox of the RadDateTimePricker in a EditItemTemplate by using jQuery.
There are two DateTimePicker, when I double click the textbox of the first picker, the value from the other picker should be copied..

Using the document ready event isn't possible, because the edit elements aren't available yet.
So my questions:
- Possible to use jQuery for that, or better from the server side?
- How to attach an event when the grid shows the elements later in the edit mode?
- How to find the elements?

Thanks
Eric
Yavor
Telerik team
 answered on 13 Jan 2010
2 answers
161 views
Does the RadTreeView control support search-as-you-type functionality?

Is there any easy way to implement it with something like the ListSearchExtender from the AjaxControlToolkit? 
Andrea
Top achievements
Rank 2
Iron
 answered on 13 Jan 2010
2 answers
411 views
How many records we can fill in radgrid without paging
also
I'm using radgrid without paging which is my core requirement,
and very often I got exception 'System.OutOfMemoryException', how could I fix it
Qamar uz Zaman Cheema
Top achievements
Rank 1
 answered on 13 Jan 2010
3 answers
170 views
hi
I am using rad editor for the first time so when I activated the feature "use rad editor to edit html field" then it modified all the html field.Is it possible to modify particular html field in list and not all of them according to my requirement?
Stanimir
Telerik team
 answered on 13 Jan 2010
1 answer
122 views
Hello,

We've purchased your package for asp.net 2 months ago and we are very pleased with it so far.

We have a question regarding your grid when all rows are opened for edit in 'in-place' mode.
On page load, we opened the entire grid rows for edit and provided an 'update' button for the user.
Once the user clicks on the Update button, we run on all grid rows and should update the DB for each row that has been changed.

How do we know which rows have been modified by the user?
Is there also a way to know the specific columns that have been modified?

This is very important for us, and we would appreciate your advice.

Thank you in advance.
Yavor
Telerik team
 answered on 13 Jan 2010
0 answers
87 views
Hi,

This is working url
http://195.89.170.82/mdrdbtest/document.aspx

When i filter some of Docno are filter correctly. Some of are not filter.

Eg;  this docno   SK-170835-01

its already in database. But its not filter. Where is the problem?

krds
lakmal



lakmal
Top achievements
Rank 2
 asked on 13 Jan 2010
4 answers
73 views
hi
I am using publishing site and I have used Rad control in my content editor but when I add flash content  in Reusable Content List it gets added up in html field but when I submit and see in all item.aspx  of the list it doesnot display the flash content.How can this problem be solved?
onkar Agarwal
Top achievements
Rank 1
 answered on 13 Jan 2010
2 answers
202 views
Hi all,
I need to change the cursor style to "pointer" when the user presses "ctrl" and the mouse is over the hyperlink in the RadEditor (in this state, broswer will navigate to the url after another click). And I try to set the style to "cursor: pointer", but it doesn't work. Any idea?

Thanks in advance.
Dylan Lin
Top achievements
Rank 1
 answered on 13 Jan 2010
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?