Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
847 views
Hi,
I have a custom control, let's say MyControl1.ascx
Inside this control I have the following code:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript">
        function ClearRadCombo(sender, eventArgs)
        {
            var mycombo = $find("<%= RadComboBox1.ClientID %>");
            mycombo.clearItems();
            mycombo.clearSelection();
        }
    </script>
</telerik:RadScriptBlock>

This works just well.

Now I want to put all of the js code in a separate file, so I've changed the above code like this:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
    <script type="text/javascript" src="../script/myscript.js">
    </script>
</telerik:RadScriptBlock>

I've registered the js file in the RadScriptManager on my MasterPage in this way:

<asp:ScriptReference Path="~/script/myscript.js" />

but it doesn't work anymore. I get a "object is null" error when the script calls the "clearItems" method, and "mycombo" is null, indeed.
So, it's possible to use RadScriptBlock with an external js file? If yes, what's wrong with my code, please?

Any help will be really appreciated.
Thank you.
ALEX
Top achievements
Rank 1
 answered on 21 May 2012
6 answers
171 views
Hi,

I have a requirement of using user control for tooltip. I am using RadScheduler, RadAjaxManager and the RadToolTipManager together. I followed all the steps as discussed in this but still there is a problem hitting OnAjaxUpdate event. I absolutely have no idea why OnAjaxUpdate event is not firing on Mouse hover of scheduler's appointment. Can someone please help me in this regard.

Thanks in Advance.

Note: I found that in view source code "loadOndemand"=false. can someone please tell me how to make this to true.
Marin Bratanov
Telerik team
 answered on 21 May 2012
1 answer
188 views
By default, toolbars take up the available space before starting on a new line. Is it possible to incluence this behaviour?

I have attached two screenshots. On the first one (it's called before.png in case the order isn't preserved), the toolbar that starts with the text and background color tools is on the first line. The toolbar that starts with the bold-tool is on the second line.

I would like to move the toolbar that starts with the color tools to the second line, as illustrated on the second screenshots (after.png).

Is this possible?
Rumen
Telerik team
 answered on 21 May 2012
1 answer
78 views
Our Application is supporting Multiple Language.
In some reports We have added option for Grid Column Filter.Some Countrie Like Netherlands using Comma(,) as decimal Separator.For the NL the data in the Grid is Translating correctly(means the Decimal separator is changing as (,)Ex the a value in the Grid is coming as 345,56).But When ever user Filtering By a Comma Separated Decimal value(like 345,56),Report Throwing Exception.
Andrey
Telerik team
 answered on 21 May 2012
4 answers
113 views
I have a radtree inside a div and I have two buttons inside that same div:  " Print Report" and Print Detailed Report" . "Print report" will print the div with radtree collapsed and "Print Detailed Report" will print the div with radtree expanded. I am using javascript to do that. Now, everything works fine in IE but in Firefox, I am not able to print the div with radtree expanded. I can see radtree expanding on the webpage but not on the window for printing. It prints that div with radtree collapsed. Here is my javascript:
for Collapsed radtree:

 

 

function PrintMe(node) {

 

 

 

var content = node.innerHTML;

 

 

 

var pwin = window.open('', 'print_content', 'width=800,height=700,scroll=no');

 

pwin.document.open();

pwin.document.write(

 

'<html><body onload="window.print()">' + content + '</body></html>');

 

pwin.document.close();

setTimeout(

 

function () { pwin.close(); }, 1000);

 

}
for Expanded Radtree:

 

 

function printSelection(node) {

 

 

 

var treeView = $find("<%= rdTreeDetails.ClientID %>");

 

 

 

var nodes = treeView.get_allNodes();

 

 

 

for (var i = 0; i < nodes.length; i++) {

 

 

 

if (nodes[i].get_nodes() != null) {

 

 

 

if (nodes[i].get_nodes().get_count() != 0) {

 

nodes[i].expand();

}

}

}

 

 

var content = node.innerHTML;

 

 

 

var pwin = window.open('', 'print_content', 'width=800,height=700,scroll=no');

 

pwin.document.open();

pwin.document.write(

 

'<html><body onload="window.print()">' + content + '</body></html>');

 

pwin.document.close();

 

setTimeout(

 

function () { pwin.close(); }, 1000);

 

 

 

for (var j = 0; j < nodes.length; j++) {

 

 

 

if (nodes[j].get_nodes() != null) {

 

 

 

if (nodes[j].get_nodes().get_count() != 0) {

 

nodes[j].collapse();

}

}

}

}

What can be done to print it expanded in firefox?

Plamen
Telerik team
 answered on 21 May 2012
1 answer
96 views
Hi ,
 I have upgraded the latest of telerik dlls.
I am facing a peculiar problem , my rad windows are opening twice.
my dot net frame work is 4.0
Thanks,
Raghav
rdmptn
Top achievements
Rank 1
 answered on 21 May 2012
1 answer
87 views
Hai there,
     Can anybody suggest a way to change transparency of tooltip with modality.
Thanks
Savyo
Princy
Top achievements
Rank 2
 answered on 21 May 2012
5 answers
81 views
Hi
I have a grid where I set the backcolor under certain situations, but when sorting one column, that formatting dissapears, I do get a GridPagerItem back in ItemDataBound instead of GridDataItem, so how do I ensure that my backcolor gets set no matter what type of column I have?

This is my code in ItemDAtaBound which works fine except when I click on a c0olumn to sort it, then that column does not have the colors anymore

    If e.Item.OwnerTableView.Name = "AlleTilbud" Then
      If TypeOf (e.Item) Is GridDataItem Then
        Dim item As GridDataItem = e.Item
        Dim farve As System.Drawing.Color = item.BackColor
        If item("tilbudtdato").Text = "&nbsp;" Then
          item.BackColor = System.Drawing.Color.Yellow
          item("statustext").Text = "Ikke i tilbud"
        Else
          item.BackColor = farve
          item("statustext").Text = "Tilbud"
        End If
        If item("svarfristdato").Text <> "&nbsp;" Then
          Dim dt As Date = CDate(item("svarfristdato").Text)
          If dt < Now Then
            item.BackColor = System.Drawing.Color.Red
            item("statustext").Text = "Svarfrist overskredet"
          End If
        End If
        If item("kontraktdato").Text <> "&nbsp;" Then
          item.BackColor = farve
          item("statustext").Text = "Kontrakt udskrevet"
        End If
        If item("status").Text.ToUpper() = "S" Then
          If item("indflyttersaldo").Text <> "&nbsp;" Then
            Dim betalt As Decimal = CDec(item("indflyttersaldo").Text)
            If betalt = 0 Then
              item.BackColor = farve
              item("statustext").Text = "Kontrakt betalt"
            End If
          End If
        End If
      End If
    End If


Betina
Top achievements
Rank 1
 answered on 21 May 2012
7 answers
286 views
Hi, I am already using ExternalDialogsPath to callup the imagemanager as standalone.
Just a few questions regarding to customization

1) how to hide treeview and addressbox 
2) When i openup the imageditor, it automatically add _thumb to the filename so when i save it it will be a new file with _thumb, how do i avoid that (I am going to hide both options so user will only edit and cannot "save as")

otherwise it's a great control to use. thanks
Rumen
Telerik team
 answered on 21 May 2012
5 answers
121 views
I read the tutorials... I watched the Video... I still do not know how to add a checkbox and a button to the RadScheduler advanced form.  Not one of those resources tells you where to put a modified AdvancedFormVB.ascx file.  If I do manage to modify it, where does it go? I get it from the samples folder, surely it doesn't stay there.  The video is so confusing -- it's all over the place; it's 1/3 through already when it finally gets to the subject of modifying the advanced form and from there it just gets worse.  The download files are useless because there is no instruction.
Peter
Telerik team
 answered on 21 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?