Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
214 views

Hi,
    I have a requirement to show a progress bar while loading a page(modal). Since we are using Telerix controls, I am planning to use radwindow for this purpuse.

Can anyone help me how to achive this

  • Open a radwindow as a modal popup when a request comes to the page. There should not any buttons either to close or minimize or whatever.
  • Close the window automatically when the page load completes

    I dont want something advance, i need just open a modal popup page which shows some text or image and it should visible until the page loads and should hide automatically.

Thanks in advance

Fiko
Telerik team
 answered on 21 Jul 2009
3 answers
410 views
The following piece of code produce a javascript error"
Type.registerNamespace("Telerik.Web.UI"); 
Type.registerNamespace("Telerik.Web.UI.WindowManager"); 
function GetRadWindowManager(){ 
return Telerik.Web.UI.WindowManager.Manager; 
window.radalert=function(_1,_2,_3,_4){ 
var _5=GetRadWindowManager(); 
var _6=_5._getStandardPopup("alert",_1); 
if(typeof (_4)!="undefined"){ 
 

The error is in the bold line, and the msg is:"Microsoft JScript runtime error: 'undefined' is null or not an object"

It is related to popUpRadMsg. I call it on this way:
<body onload="msgAlert()">






</html>
.
.script goes under the </html>:
.





...
<script language="javascript" type="text/javascript"
    // This code must be in the master and cannot be moved to external js file. 
    // We use String comparsion instead of boolean, to keep the code valid. 
    // if (Convert.ToString(divDisplayMsg.Visible)).ToLower()  is accidently empty, no harm is done and the code is still valid. 
    function msgAlert() { 
        var toPopup = "<%=(Convert.ToString(divIsDisplayMsgVisible.Visible)).ToLower() %>"
        if (toPopup == "true") { 
            var displayMsgDiv = document.getElementById("<%=divDisplayMsg.ClientID %>"); 
             
            if (displayMsgDiv) { 
                var msg = displayMsgDiv.innerHTML
                //alert(msg); 
                popupRadMsg(msg); 
            }  
            //popupDisplayMsg(); 
 
        } 
    } 
</script> 
 
 

and on an attached JS file:
function popupRadMsg(msg){ 
            return radalert(msg, 500, 500); 
          } 

This alert is invoked depending on the visibility  of divDisplayMsg. this is set on the server side and allow me to control the popup msg (I can send text and info from server side to it).

Maybe you can tell why is this javascript error occurs?

(IE7, IE6, FF)
Georgi Tunev
Telerik team
 answered on 21 Jul 2009
1 answer
128 views
Dear sir,
How can I save dock state at client side in database

thanks with regards
Mr. Plinko
Top achievements
Rank 1
 answered on 21 Jul 2009
4 answers
191 views
Hi all,
I want to call a server-side routine when a menu item is clicked, and have tried using the following code (extract):

 
<telerik:RadScriptBlock ID="cb1" runat="server">  
    function InitiateAjaxRequest(arguments)  
    {  
      var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");  
      ajaxManager.ajaxRequest(arguments);  
    }  
 
 
  function emailMenuClicked(sender, args)  
  {  
     var itemValue = args.get_item().get_value();  
     if (args.get_item().get_text() == "Email Customer")  
     {  
        InitiateAjaxRequest("EmailCustomer",1);  
     }  
     if (args.get_item().get_text() == "Email Officer")  
     {  
        InitiateAjaxRequest("EmailOfficer",2);  
     }  
  }         
</telerik:RadScriptBlock> 
 
 
 
    <telerik:RadContextMenu ID="RadContextMenu1" runat="server" EnableEmbeddedSkins="False" 
        Skin="Glastir" OnClientItemClicked="emailMenuClicked">  
        <Items> 
            <telerik:RadMenuItem runat="server" Text="Email Customer">  
            </telerik:RadMenuItem> 
            <telerik:RadMenuItem runat="server" Text="Email Officer">  
            </telerik:RadMenuItem> 
        </Items> 
        <Targets> 
            <telerik:ContextMenuControlTarget ControlID="RadScheduler1" /> 
        </Targets> 
    </telerik:RadContextMenu> 

 

I need to put the Javascript in a RadScriptBlock because I need to evaluate the AjaxManager's client ID. However, when I do this, I get an 'object expected' error because the emailMenuClicked function is not visible to the RadContextMenu.

When I put the emailMenuClicked function in an ordinary <script></script> tag, then the code there can't see the InitiateAjaxRequest function.

I'm sure there's a simple solution, but I'm going round in circles on this - can someone point me in the right direction, please?

Thanks,

James

James
Top achievements
Rank 1
 answered on 21 Jul 2009
2 answers
202 views
I have a problem with the RadDatePicker's Event "selectedDateChanged". It raises without problems if it was created in the Markup, and the eventhandler is attached there such as:

<rad:RadDatePicker ID="rdp1" AutoPostBack="true" runat="server"  
        onselecteddatechanged="rdp1_SelectedDateChanged"></rad:RadDatePicker> 

If this Control is created by code, NO Eventhandler will fire:
RadDatePicker rdp = new RadDatePicker(); 
            rdp.SelectedDate = new DateTime(2009, 5, 4); 
            rdp.AutoPostBack = true;             
            rdp.SelectedDateChanged += new SelectedDateChangedEventHandler(rdp_SelectedDateChanged); 
this.Controls.Add(rdp); 
             

I searched for help here in the forum but I didn't get the trick to let the Handler fire....

Please help ;)

Thanks already
Frithjof
Fred
Top achievements
Rank 1
 answered on 21 Jul 2009
2 answers
118 views
Hello,
I'm having a formating issue displaying my hierarchal grid in while my Grid is in insert mode.
When i switch my grid to insert mode i hide the ExpandColun.
protected void _orgGrid_ItemCreated(object sender, GridItemEventArgs e) 
        { 
            if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
            { 
                if (editItem.OwnerTableView.IsItemInserted) 
                {     
                     _orgGrid.MasterTableView.GetColumn("ExpandColumn").Display = false;  
                } 
            } 
However, this causes my insert template (a user control) to be rendered in the second column of my grid and the first column has a large empty space.
Is there something i can do to force my user control to span across all columns?

The main goal i'm trying to achieve is to disable expanding of rows while the user is inserting an item.
Thanks.
COLIN
Top achievements
Rank 1
 answered on 21 Jul 2009
2 answers
220 views
Hi,

I use a binary image column in one of my grids.  Not every row will have an image - some will come as NULL from the database.  For those rows how do I stop the component trying to display the image?  I've looked through the fields for the column and can't see anything obvious so assume that I'll need to do something on the ItemDataBound event.  Has anyone encountered this yet and if so could you let me know how you resolved it?

What would be good is to be able to specify either an alternate image to display when there is no thumbnail or some text to display when no image.  Could that be built into a future version please?

Regards,

Jon
Jon
Top achievements
Rank 1
 answered on 21 Jul 2009
1 answer
144 views
I am trying to create a dashboard using the RadDockZone and dynamic RadDocks as per your example (http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx).

However, you can update the RadDocks in session (I will later add this to a DB) and can control adding/moving and expand/collapse, but you cannot remove from session individual items.  I am trying to catch the "Close" command so that I can remove an individual item only from session, in the example it only shows how to clear all items from session.  The problem that I have is that the "Close" command does not seem to fire a PostBack unlike the move/expand/collapse, is there a way for me to achieve this?
Pero
Telerik team
 answered on 21 Jul 2009
1 answer
76 views
I'm building a tech demo with 2 radcombos on one page.

Combo1 filters Combo2's items.

The callback seems fine on PC but on my WindowsMobile 6.0 and 6.5 emulators a postback is fired.

Has anybody done his before?
Paul
Telerik team
 answered on 21 Jul 2009
1 answer
546 views
Hi
 I have a  RadTextbox on the page.
now on page load i want to set the value of the radtextbox to the Client dateteim.
i have used the following code


window.onload = function fillText()
{
var txtDate=document.getelementbyid("txtDate");
txtDate.Value="Date from javascript";
}


but this code is not working please help me
Dimo
Telerik team
 answered on 21 Jul 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?