Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
354 views
hi at all

i have a problem with the radalert

i want show a radalert after  postback, i can  but my problem is that the radalert
continuous showing in each postback or if i push on the update page button.
my code is this

on the server
//I use this because a iam using a RadAjaxManager   
 RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(pru);")

on the client

function pru()
{
    var owdn=radalert("say something");
    owdn.add_close(clean);
}
function clean()
{
    Sys.Application.remove_load(pru);
// this function is solution to my problem , but isn't  complete because if i press a //update button, the radalert come back againĀ”
}
what can i do ? what's wrong ? iam programming on visual basic 2005





Lenny_shp
Top achievements
Rank 2
 answered on 31 Oct 2008
3 answers
116 views
We have a page that opens a modal radwindow.
This radwindow in turn opens a modal radwindow.

Is it possible for the last radwindow to not be confined within the borders of the previous radwindow?

Thank you.
Georgi Tunev
Telerik team
 answered on 31 Oct 2008
1 answer
83 views
I experienced problems trying to get the RadEditor SpellChecker to work in the Lite Version. The default MOSS spellchecker would display HTML markup and the RadEditor version would not appear on the toolbar; even after following the instructions at this link:

http://www.telerik.com/help/moss/editor/add%20ajaxspellcheck%20in%20radeditor%20for%20moss.html

So, I performed a by-the-Telerik-book upgrade to the Trial Version (since my college is interested in purchasing the licensed version anyway), and ensured that the entries were made in both ā€œToolsFiles.xmlā€ files.  Unfortunately the behavior I listed above still persisted. The RadEditor SpellChecker does not seem to be visible.

While RadEditor seems to be working properly with regards to cross-browser content editing, I cannot seem to resolve this issue with SpellCheck.

Any help would be greatly appreciated...

Craig J (MCTS)
Rumen
Telerik team
 answered on 31 Oct 2008
8 answers
223 views

Hi,

I am wondering how I can update combobox's text on Ajax postback.  I have tried using AjaxManager and AjaxPanel, but none of them worked.  I am using 2008 Q2 trial.  Here are what I have:


Using AjaxManager
[ASPX]

<telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true" 
    RadComboBoxImagePosition
="Left" Text="" AutoPostBack="true" 
    OnSelectedIndexChanged
="OnComboSelectedChange" Runat="server" >
    <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation
>
</telerik:RadComboBox>


<
telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
   
<AjaxSettings>
       
<telerik:AjaxSetting AjaxControlID="RadComboBox1">
           
<UpdatedControls>
               
<telerik:AjaxUpdatedControl ControlID="RadComboBox1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
   
</AjaxSettings>
</telerik:RadAjaxManager>

 

 

[C#]

 

 

protected void OnComboSelectedChange(object o, Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs e)
{
    RadComboBox1.Text = RadComboBox1.SelectedIndex.ToString();
}

 

 


Using AjaxPanel
[ASPX]
<telerik:RadAjaxPanel ID="RadAjaxPanel3" runat="server">
    <telerik:RadComboBox ID="RadComboBox1" AllowCustomText="true"
        RadComboBoxImagePosition
="Left" Text="" AutoPostBack="true"
        OnSelectedIndexChanged
="OnComboSelectedChange" Runat="server" >
        <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
    </telerik:RadComboBox>
</telerik:RadAjaxPanel>


[C#]
protected void Page_PreRender(object sender, EventArgs e)
{
   
if (RadAjaxPanel3.IsAjaxRequest)
    {
        RadComboBox1.Text = RadComboBox1.SelectedIndex.ToString();
    }
}

 

Peichung
Top achievements
Rank 1
 answered on 31 Oct 2008
1 answer
163 views
I have this JavaScript code:

        function recipient_click(ajaxMgrId, checkBoxId, contactId) {
            var chk = $get(checkBoxId);
            var mgr = $find(ajaxMgrId);
            var args = '';
            
            if (chk.checked) {
                args += 'Add:' + contactId;
            }
            else {
                args += 'Remove:' + contactId;
            }

            mgr.ajaxRequest(args);
        }

On the first click of a checkbox, the code works.  On the second click, the last line (mgr.ajaxRequest...) fails because mgr is null.  The ids of the manager have not changed between calls, but $find() does not work.  No exceptions are occurring in the server side code. 

Any thoughts on why the Ajax Manager is null on subsequent calls?

Thanks in advance...


Rosen
Telerik team
 answered on 31 Oct 2008
13 answers
241 views
Hi, i have implement a function that  check if a resourcetype("ClassRoom") exist in radscheduler, for example can not insert two appointment at the same day,start and end time for the same resource, the limitings appointment runs, but if i insert the same resource at the same day,start and end time, the function is not correct...

My code:   Where is the error of my function?is not easy to implement this..but is more important for keep the overlop.
 
Private Const AppointmentsLimit As Integer = 1 
 
Protected Function ExceedsLimit(ByVal apt As Appointment) As Boolean 
        Dim appointmentsCount As Integer = RadScheduler1.Appointments.GetAppointmentsInRange(apt.Start, apt.End).Count 
        Return (appointmentsCount > (AppointmentsLimit - 1)) 
 
    End Function 
 
 Protected Function OccupazioneAule(ByVal apt As Appointment, ByVal scheduler As RadScheduler) As Boolean 
        For Each ResourceAule As Appointment In RadScheduler1.Appointments.GetAppointmentsInRange(apt.Start, apt.[End]) 
            For Each ResourceAuleApt As Resource In ResourceAule.Resources.GetResourcesByType("Aule") 
                For Each res As Resource In apt.Resources.GetResourcesByType("Aule") 
                    If ResourceAuleApt.Key.Equals(res.Key) Then 
                        Return True 
                    End If 
                Next 
            Next 
        Next 
        Return False 
    End Function 
 
 
 Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert 
 
        If ExceedsLimit(e.Appointment) And OccupazioneAule(e.Appointment, RadScheduler1) Then 
            RadAjaxManager1.ResponseScripts.Add("radalert('Aula giĆ  prenotata, riprovare!!', 300, 180);") 
            e.Cancel = True 
        Else 
            If ExceedsLimit(e.Appointment) Then 
                RadAjaxManager1.ResponseScripts.Add("radalert('Aula giĆ  prenotata, riprovare!!', 300, 180);") 
                e.Cancel = True 
            End If 
        End If 
    End Sub 
 
 
 Protected Sub RadScheduler1_AppointmentUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentUpdateEventArgs) Handles RadScheduler1.AppointmentUpdate 
 
        If ExceedsLimit(e.ModifiedAppointment) Then 
            For Each a As Appointment In RadScheduler1.Appointments.GetAppointmentsInRange(e.ModifiedAppointment.Start, e.ModifiedAppointment.[End]) 
                If a.ID <> e.Appointment.ID Then 
                    e.Cancel = True 
                End If 
            Next 
        End If 
 
    End Sub 
 
 




Rubihno
Top achievements
Rank 1
 answered on 31 Oct 2008
1 answer
124 views
There appears to be an incompatibility between several HP IE add-ons and the RadDatePicker (maybe others too, but the radPanelBar works just fine). 

The behavior varies from the pop-up calendar refusing to pop up at all, to the calendar popping up w/all dates grayed out.  Only two people (there are about 100 seats out there running my web app) have this problem and they can login to a neighbor's computer and it works great.  One of the cases they are 100% citrix, so they are all really running the same copy of IE --that is when I realized it had to be a different or corrupted profile.  Here is an excerpt from an e-mail from one of my customers:

There were four add-ons that apparently auto-installed themselves when I installed the software for the HP printer that is attached locally to Tracy’s PC.  He disabled those add-ons and everything works fine now.  Apparently they were conflicting in some way.  I thought maybe you could use the information to help figure out the similar issue you mentioned with another customer.

 

The add-ons were:

 

HP Clipbook – Browser Extension

HP Print Clips – Browser Helper Object

HP Print Enhancer – Browser Helper Object

HP Smart Select – Browser Extension

 

Of course, I don’t know which one caused the problem, but I don’t intend to re-enable any of them. 

We resolved the problem by unloading / disabling the add-ons, so I'm not asking for help.  I just thought you would want to know for other support cases and also maybe fix this incompatibility if there's something you can do on your end or by contacting HP.
Pavel
Telerik team
 answered on 31 Oct 2008
12 answers
189 views
Hi,

I am trying to have Grid in Rad Combo Box. I am able to show grid in Combo Box but what i want to do is user should be able to filter items using grid filters. Only when he clicks on some row in grid then the information in that grid should be displayed in Combo box, the id which is hidden for any column should be accessible from Code behind.

Following is sample code that i am using.

Aspx Page

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default3.aspx.cs" Inherits="Default3" %>
<%@ 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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <div>
            <telerik:radcombobox id="RadComboBox1" runat="server" skin="Office2007" width="100%"
                nowrap="True">
            <ItemTemplate>
                <div>
                    <telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" GridLines="None"
                        AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" OnNeedDataSource="RadGrid1_NeedDataSource"
                        EnableLinqExpressions="false" PageSize="100">
                        <MasterTableView AllowFilteringByColumn="true">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px"></HeaderStyle>
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Name" SortExpression="Name"
                                    UniqueName="Name" CurrentFilterFunction="Contains" AutoPostBackOnFilter="false"
                                    Display="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Subject1" HeaderText="Subject" SortExpression="Subject1"
                                    UniqueName="Subject1" CurrentFilterFunction="StartsWith" AutoPostBackOnFilter="false"
                                    Display="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="RollNumber" HeaderText="Roll Number" SortExpression="RollNumber"
                                    UniqueName="RollNumber" CurrentFilterFunction="GreaterThan" AutoPostBackOnFilter="false">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Score" HeaderText="Score" SortExpression="Score"
                                    UniqueName="Score" CurrentFilterFunction="EqualTo" AutoPostBackOnFilter="false">
                                </telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                        <ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True" AllowColumnHide="True">
                            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
                            <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" />
                        </ClientSettings>
                    </telerik:RadGrid>
                </div>
            </ItemTemplate>
            <Items>
                <telerik:RadComboBoxItem />
            </Items>
            <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
        </telerik:radcombobox>
        </div>
    </form>
</body>
</html>

Code Behind

using System;
using System.Web.UI;
using Telerik.Web.UI;

public partial class Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            Marks m = new Marks(1, "sad", 221);
            ((RadGrid)RadComboBox1.Items[0].FindControl("RadGrid1")).DataSource = m.GetMarks();
            ((RadGrid)RadComboBox1.Items[0].FindControl("RadGrid1")).DataBind();
        }
    }

    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        Marks m = new Marks(1, "sad", 221);
        ((RadGrid)RadComboBox1.Items[0].FindControl("RadGrid1")).DataSource = m.GetMarks();
    }
}

Marks Class

using System.Collections.Generic;
using System.Web.Caching;

/// <summary>
/// Summary description for Marks
/// </summary>
public class Marks
{
    private int rollNumber;

    public int RollNumber
    {
        get { return rollNumber; }
        set { rollNumber = value; }
    }
    private string Subject;

    public string Subject1
    {
        get { return Subject; }
        set { Subject = value; }
    }
    private int score;

    public int Score
    {
        get { return score; }
        set { score = value; }
    }


    private string name;
    public string Name
    {
        get { return name; }
        set { name = value; }
    }


    public Marks(int rNo, string Sub, int sc)
    {
        rollNumber = rNo;
        Subject = Sub;
        score = sc;
    }

    public Marks(int rNo, string Sub, int sc, string name)
    {
        rollNumber = rNo;
        Subject = Sub;
        score = sc;
        Name = name;
    }

    public List<Marks> GetMarks()
    {
        List<Marks> lstMarks = new List<Marks>();
        if (System.Web.HttpContext.Current.Cache["Values"] == null)
        {
            for (int i = 1; i <= 200; i++)
            {
                for (int j = 1; j < 4; j++)
                {
                    lstMarks.Add(new Marks(i, "Subject " + i.ToString(), i * j, "Name" + (i * j / i).ToString() + i.ToString() + j.ToString()));
                }
            }
            System.Web.HttpContext.Current.Cache["Values"] = lstMarks;
        }
        else
        {
            lstMarks = ( List<Marks>)System.Web.HttpContext.Current.Cache["Values"];
        }
        return lstMarks;
    }

}




Siddharth
Top achievements
Rank 1
 answered on 31 Oct 2008
2 answers
134 views
I am having an interesting problem that would on the surface appear to be unrelated to the RadEditor.

Basically, I have a RadEditor near the top of the page, not inside of a update panel. This gets its content loaded from a database.

Underneath this, I have an updatepanel with some drop down lists and a few buttons that do stuff with the selected items in the drop down list. When I press one of these buttons for the first time after loading the page, I get Sys.WebForms.PageRequestManagerParserErrorException, with details:

Error parsing near ' <!DOCTYPE html P'.

The very odd thing is this: I ONLY get this error if there is complicated HTML text within the RadEditor at the top of the page. If this Editor is empty, then the error does not occur. I have tested this over and over again, always with the same results. If there is just plain text in the editor, I do not get ParserErrorException. If there is more complicated html that I have pasted into the Editor previously and saved to the database, that has now been loaded into the Editor, I always get the exception when I press one of the buttons in the uploadpanel below it for the first time after I have loaded the page.

Any thoughts as to how the contents of the RadEditor above the Update Panel would affect the presence of the Parser exception? All help would be greatly appreciated.

UPDATED - This Exception does not appear in Internet Explorer, but does occur in Firefox 2 and 3 and in Safari.
Rumen
Telerik team
 answered on 31 Oct 2008
0 answers
135 views
Is it possible to let the child buttons in a splitbutton expand to the left?

I have a help button to the very top-right and when I click the splitbutton all my child buttons goes out of screen . I would like it to expand in the other direction  (like a menu).

How can I do this?
H
Top achievements
Rank 1
 asked on 31 Oct 2008
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?