Hi, the RadNotification tool looks extremely useful for my application, but I am having some trouble understanding how to have it do what I want. I want to essentially perform a 'check' every 60 seconds, which will see if there are any new rows in a certain table. if there are, I want to tell the user and show them some details of this row - if not I don't want the notification to show.
Here's what I have currently:
This 'sort of' works, but the notification pops up for a a very short time then disappears if the value is 0, when I want it to not show it at all.
Here's what I have currently:
function
OnClientUpdated(sender, args) {
var
value = sender.get_value();
if
(value == 0) {
sender.hide();
}
}
<
telerik:RadNotification
ID
=
"notification"
runat
=
"server"
Title
=
"Incorrect Picking"
ShowInterval
=
"30000"
KeepOnMouseOver
=
"true"
UpdateInterval
=
"30000"
AutoCloseDelay
=
"5000"
OnClientUpdating
=
"OnClientUpdating"
OnClientUpdated
=
"OnClientUpdated"
LoadContentOn
=
"TimeInterval"
ShowCloseButton
=
"true"
Width
=
"250px"
oncallbackupdate
=
"notification_CallbackUpdate"
>
<
ContentTemplate
>
<
asp:Literal
ID
=
"ltlJob"
runat
=
"server"
></
asp:Literal
> <
asp:ImageButton
ID
=
"btnRefresh"
runat
=
"server"
ImageUrl
=
"~/Content/Images/refresh.png"
OnClick
=
"RefreshGrids"
/>
</
ContentTemplate
>
</
telerik:RadNotification
>
protected
void
notification_CallbackUpdate(
object
sender, Telerik.Web.UI.RadNotificationEventArgs e)
{
LMDBDataContext dc =
new
LMDBDataContext();
List<Job> jobs =
//Get new jobs
if
(jobs.Count > 0)
{
notification.Value =
"1"
;
ltlJob.Text = jobs.Count;
}
else
{
notification.Value =
"0"
;
}
}
This 'sort of' works, but the notification pops up for a a very short time then disappears if the value is 0, when I want it to not show it at all.