Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
283 views
Hello,

I have a couple of issues with my new message notification.  First, calling the code-behind .show() method in the CallBackUpdate event does not seem to do anything.  I had to use the javascript method shown in the Notification / Update on interval demo, and that works.

Secondly and more importantly, when the notification is displayed, normally it disappears after the AutoCloseDelay (7 secs) has elapsed.  This is fine, unless the user mouses over the notification if they want to read it longer.  The notification itself remains, but after the UpdateInterval (10 secs) elapses, the .Text value of the LinkButton control in the ContentTemplate is wiped out.  Does it not persist in the viewstate?  Not sure how to work around this.  Once the notification is shown, the data is flagged as such so that it does not show again.

Thanks,
Dan

<script type="text/javascript">
function OnClientUpdated(sender, args) {
    var newMsgs = sender.get_value();
    if (newMsgs != 0) {
        sender.show();
    }
}
     
</script>

<telerik:RadNotification ID="RadNotification1" runat="server" Width="330px" Height="75px" OnClientUpdated="OnClientUpdated" ContentIcon="" TitleIcon="~/App_Themes/MainTheme/images/message_16.png" Title="New Message(s)" LoadContentOn="TimeInterval" UpdateInterval="10000" Animation="Fade" AutoCloseDelay="7000" OffsetX="-10" OffsetY="-35">
<ContentTemplate>
<asp:LinkButton ID="lbNotification" runat="server" PostBackUrl="~/Messages.aspx" CssClass="msg"></asp:LinkButton>
</ContentTemplate>
</telerik:RadNotification>

Protected Sub RadNotification1_CallbackUpdate(sender As Object, e As Telerik.Web.UI.RadNotificationEventArgs) Handles RadNotification1.CallbackUpdate
 
    Dim MsgFrom As String = ""
    Dim Regarding As String = ""
    Dim Message As String = ""
 
    If CheckForMessages(MsgFrom, Regarding, Message) Then
        Message = Replace(Message, "<br>", " ")
        Message = IIf(Len(Message) > 60, Left(Message, 60) & "...", Message)
 
        lbNotification.Text = "<b>" & MsgFrom & "</b><br>" & _
                              Regarding & "<br>" & _
                              Message
        RadNotification1.Value = 1
    Else
        RadNotification1.Value = 0
    End If
 
End Sub

Dan
Top achievements
Rank 1
 answered on 21 Jun 2012
1 answer
80 views
Hi,
i have style out buttons using the below css classes.  They seem to work well across all browsers in standards mode; except for when click on in internet explorer 9 (unsure if its all IE or just 9).  The hover all works find and dandy no problems but as soon as the button is clicked the background disappears?

a.Button.RadButton,
a.rbSkinnedButton.Button:hover, /*  0 3 1   */
a.RadButton_Outlook.rbSkinnedButton, /*  0 2 1    */
a.RadButton_Outlook.rbVerticalButton, /*   0 2 1   */
a.RadButton_Outlook .rbSplitRight, /*  0 2 1     */
a.RadButton_Outlook .rbSplitLeft /*   0 2 1   */
{
    background-image: url('/Common/Images/buttonSprite.png');
    background-position: 100% -25px;
    height: 21px;
    display: inline-block;
    padding-right: 4px;
}
.rbSkinnedButton:hover .rbDecorated, /* 0 3 0 */
.RadButton_Outlook.rbVerticalButton .rbDecorated, /* 0 3 0 */
.RadButton_Outlook.rbSkinnedButton, /*  0 2 0    */
.RadButton_Outlook .rbDecorated, /*  0 2 0    */
.RadButton_Outlook.rbVerticalButton, /*  0 2 0    */
.RadButton_Outlook .rbSplitRight, /* 0 2 0     */
.RadButton_Outlook .rbSplitLeft /*  0 2 0    */
 {
        background-image: url('/Common/Images/buttonSprite.png');
        background-position: 0% 0%;
        padding-right: 2px;
        height: 21px;
        margin-right: 0px;
        box-sizing: border-box;
        color: white;
}

Please help,
Thanks,
Michael
Slav
Telerik team
 answered on 21 Jun 2012
1 answer
99 views
I have an issue with the combo boxes when either the app pool is recycled or a new build is deployed. If a user is on a page with a combobox and while working on it back at the server the app pool recycles or a new build is deployed when they then post back to the server the SelectedItem is null in the server code. The Text property still has its value however. I have spent a large amount of time trying to figure out why it does this. So my question is this by design? Does the combobox use either session or such behind the scenes and when the app recycles it is lost?

I am not posting code, but if you take a page with a combox box, a button and put it in a IIS web site you can then reproduce it. Simply got to the page and while on it recycle the app pool and then submit the form. Try then to access the selected item and you will see its null while the Text has a value.

Short of never doing recycles I am not sure what to do to prevent this. Thanks.
James Daresta
Top achievements
Rank 1
 answered on 21 Jun 2012
1 answer
69 views
Im using a RadMenu in an SSL site.  The menu does not render correctly.  It works fine on my developement computer and ive used the control successfully on non SSL sites.  Is there something special I need to do ?
Kate
Telerik team
 answered on 21 Jun 2012
1 answer
90 views
Hello,

I have a radgrid that a populate using the ItemDataBound event with my own Object (called 'ConfigurationValueObject'). Mapping its properties and displaying the grid is no problem, however I want to use the GroupByExpressions property to group all data using the property 'Category' in my object. When I add the code:

<GroupByExpressions>
    <telerik:GridGroupByExpression>
        <GroupByFields>
            <telerik:GridGroupByField FieldName="Category" />
        </GroupByFields>
    </telerik:GridGroupByExpression>                           
</GroupByExpressions>

I receive the following error:

No property or field 'Category' exists in type 'ConfigurationValueObject'


But I know this object does have this (public) property. What I am doing wrong?
Tim
Top achievements
Rank 1
 answered on 21 Jun 2012
5 answers
184 views
How to refresh page after manual close of RadToolTipManager ? We Created page that using radtooltipmanager .Inside RadToolTip ,we have to save data and want to refresh the page after saving the data. These RadTooltip is inside RadLisView.

Please anybody help me ? I really appreciate .Thanks for yours consideration.
Marin Bratanov
Telerik team
 answered on 21 Jun 2012
0 answers
127 views

Hello,

I have a web forms application, which has a page with a Telerik RadGrid. This grid is bound using the NeedDataSource event and I have changed most of the columns to CustomFilteringColumns. In one of them I am using a line like this one:

((GridFilteringItem) ((filterControl).Parent)).FireCommandEvent("Filter", new Pair("Custom", "Status"));

 

to filter the orders that this grid contains. Since there are quite a few of them /more than 1000/ I get an error

‘
Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.’

I understand that one possible way to fix that is to use a linq query with a where clause, which will serve as a filter.

My questions are: what is the best way to solve this problem? If it is using linq, how should I implement this filter?

Ivan
Top achievements
Rank 1
 asked on 21 Jun 2012
1 answer
231 views

Hi,

I have used a 2 RadDatepicker controls, one for start date and one for end date.
When End Date is less than start date, i am triggering an error message But the problem is once i come back from error message
EndDate would still have new Date which i picked.. How can i set it back to original Date ??

Ex: Start Date : 1/1/1999  End Date 1/1/2000
I will Modify Modify  Start Date : 1/1/1999 End Date  1/1/1998

Now End Date should not be 1/1/1998 , it should be set back to 1/1/2000 on error.


below is code

  <telerik:GridTemplateColumn HeaderText="Start" UniqueName="fispersrt" DataField="fispersrt"
                                Visible="true">
                                <ItemTemplate>
                                    <telerik:RadDatePicker ID="rdDtStrtpkr" runat="server" SelectedDate='<%#Eval("fispersrt")%>'
                                        Width="100%" CssClass="txtbx" onchange="javascript:return DirtyFlagUpdate()">
                                        <ClientEvents OnDateSelected="OnDateSelected" />
                                    </telerik:RadDatePicker>
                                </ItemTemplate>
</telerik:GridTemplateColumn
<telerik:GridTemplateColumn HeaderText="End" UniqueName="fisperend" DataField="fisperend"
                                Visible="true">
                                <ItemTemplate>
                                    <telerik:RadDatePicker ID="rdDtEndpkr" runat="server" SelectedDate='<%#Eval("fisperend")%>'
                                        Width="100%" CssClass="txtbx" onchange="javascript:return DirtyFlagUpdate()">
                                        <ClientEvents OnDateSelected="OnDateSelected" />

                                    </telerik:RadDatePicker>
                                </ItemTemplate>
  </telerik:GridTemplateColumn>

  function OnDateSelected(sender, e) {
            if (e.get_newDate() < e.get_oldDate()) {
                DisplayErrorMessage('ERRSA20404', 'Error');

            }
        }

Regards,
Akki
Eyup
Telerik team
 answered on 21 Jun 2012
1 answer
218 views
I would like to disable some items in combo box when I click on button . What I am doing is on button click  I will show a rad window with a combo box , when that was loaded I would like to disable some items

My design is as follows

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="radWindow.aspx.cs" Inherits="radWindow" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="radScript" runat="server">
    </telerik:RadScriptManager>
    <div>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" Behavior="Default"
            InitialBehavior="None">
            <Windows>
                <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Default" InitialBehaviors="None"
                    OpenerElementID="btn" Width="650" Height="480" VisibleOnPageLoad="false">
                    <ContentTemplate>
                        <telerik:RadComboBox ID="rdcmb" runat="server">
                            <Items>
                                <telerik:RadComboBoxItem Text="One" Value="One" />
                                <telerik:RadComboBoxItem Text="Two" Value="Two" />
                                <telerik:RadComboBoxItem Text="Three" Value="Three" />
                                <telerik:RadComboBoxItem Text="Four" Value="Four" />
                            </Items>
                        </telerik:RadComboBox>
                        <telerik:RadTextBox ID="rdText" runat="server">
                        </telerik:RadTextBox>
                        <telerik:RadButton ID="radbtn" runat="server" Text="Save" OnClick="radbtn_Click">
                        </telerik:RadButton>
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
        <asp:Button ID="btn" runat="server" OnClick="btn_Click" Text="Click" />
    </div>
    </form>
</body>
</html>

My code on button click is as follows

protected void btn_Click(object sender, EventArgs e)
    {
        foreach (RadComboBoxItem item in rdcmb.Items)
        {
            if (item.Text == "One" || item.Text == "Two")
            {
                item.Remove();
            }
        }
        RadWindowManager1.Windows[0].VisibleOnPageLoad = true;
    }

But I am unable to achieve the required.
Shinu
Top achievements
Rank 2
 answered on 21 Jun 2012
0 answers
70 views
I am using TreeList control with FormTemplate using MetroTouch skin. WHenever I click on add a record button, instead displaying form insert form under that record, the form always appear at the top of the TreeList.

Regards,
Imran Ahmad
Imran
Top achievements
Rank 1
 asked on 21 Jun 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?