This is a migrated thread and some comments may be shown as answers.

Set ShowInterval on Client Side or Show Invisible RadNotification on Client Side

2 Answers 84 Views
Notification
This is a migrated thread and some comments may be shown as answers.
gc_0620
Top achievements
Rank 1
gc_0620 asked on 16 Oct 2015, 04:38 AM

I would like to do one of the following:

1) Set ShowInterval value something like 5000 on RadButton (BtnSubmit here) from Client Side?
2) Assuming I made RadNotification2 as invisible and possible to make it visible from below  or other Client Side Function?

Thanks

gc_0620

______________

 

function CallClientShow() {
                        //    document.getElementById("divshowprocess").style.display = 'inline';
                        var notification = $find("<%=RadNotification2.ClientID %>");
 
                        notification.show();
                    }
                     
                     
                     
                     <telerik:RadButton runat="server" Skin="Silk" ID="Submit" OnClientClicked="CallClientShow" Text="Submit" OnClick="Submit_Click">
                                    </telerik:RadButton>
                                     
                                    <telerik:RadNotification ID="RadNotification2" ShowCloseButton="false" ShowSound="info" runat="server" VisibleOnPageLoad="false"
                                    Position="BottomCenter" Skin="MetroTouch"
                                                 Width="579px" Height="100px" Animation="Slide" EnableRoundedCorners="true" EnableShadow="true"
                                                 Text="Please wait while your request is being processed!!!" KeepOnMouseOver="false" 
                                                 Title="Processing..." ShowTitleMenu="true" OffsetX="-20" OffsetY="-20" AutoCloseDelay="0">
                        </telerik:RadNotification>

 

protected void Submit_Click(object sender, EventArgs e)
        {
           // RadNotification2.Visible = true;
            RadNotification2.Show();
      }

2 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 16 Oct 2015, 11:03 AM

Hi gc_0620,

You can use the set_showInterval() method RadNotification provides: http://docs.telerik.com/devtools/aspnet-ajax/controls/notification/client-side-programming/radnotification-object.

If a control's Visible property is set to false it does not render at all so such a notification cannot be shown with client-side code alone. Setting Visible to true on the server and calling the server Show() should do it, assuming the control is part of the response (i.e., it is included in the partial rendering if you are using AJAX).

On a side note - you may want to look into the RadAjaxLoadingPanel control that shows a loading animation during AJAX requests without any additional code: http://demos.telerik.com/aspnet-ajax/ajaxloadingpanel/overview/defaultcs.aspx.

Regards,

Marin Bratanov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
gc_0620
Top achievements
Rank 1
answered on 17 Oct 2015, 12:49 PM

Thanks Marin,

By adding set_showinterval() in client side did the trick. Thanks again

function CallClientShow()
{
                       
   var notification = $find("<%=RadNotification2.ClientID %>");
   notification.set_showInterval(5000);
   notification.show();
}

 

Tags
Notification
Asked by
gc_0620
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
gc_0620
Top achievements
Rank 1
Share this question
or