Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
328 views
Hi,

We have a user control that has a rad ajax panel on there to "ajaxify" the page.  Upon clicking the Submit button we fire off an ajax request to the server and then add some javascript to our panels response scripts.

This is working in all browsers except... yes you guessed it... IE6!

In IE 6 all of the server side code is executed but the client script that was added to the response scripts is not fired.  We then get the following error message:

"Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed."
This is thrown at the following location:

_endPostBack: function PageRequestManager$_endPostBack(error, executor, data) {
        if (this._request === executor.get_webRequest()) {
            this._processingRequest = false;
            this._additionalInput = null;
            this._request = null;
        }
 
        var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
        Sys.Observer.raiseEvent(this, "endRequest", eventArgs);
        if (error && !eventArgs.get_errorHandled()) {
            throw error;
        }
    },

I have no idea where to go from this point so any help is greatly appreciated.  I have also included the
code below to help diagnose what the issue could be.

<telerik:RadAjaxPanel ID="rap" runat="server" Width="100%" OnAjaxRequest="rap_AjaxRequest"
    LoadingPanelID="ralp">
    <div id="enquiryWrapper">
        <div id="detailsDiv">
            <h2>
                Your Details</h2>
            <h3>
                Name:</h3>
            <p>
                <asp:TextBox ID="NameBx" runat="server"></asp:TextBox></p>
            <h3>
                Telephone:</h3>
            <p>
                <asp:TextBox ID="TelBx" runat="server"></asp:TextBox></p>
            <h3>
                Email:</h3>
            <p>
                <asp:TextBox ID="EmailBx" runat="server"></asp:TextBox>
                <asp:HiddenField ID="hidSubject" runat="server" ClientIDMode="Static" />
            </p>
        </div>
        <div id="requestDiv">
            <h2>
                Nature of your enquiry</h2>
            <textarea id="EnqTxtBx" cols="40" rows="10"></textarea>
        </div>
        <div id="submitDiv">
            <h2>
                Submit your request</h2>
            <img id="sendBtn" alt="SendButton" src="themes/buttons/SendBtn.png" class="clickable"
                title="Submit your Enquiry" onclick="SendEnquiry()" onmouseover="javascript:this.src='themes/buttons/sendBtn-on.png'"
                onmouseout="javascript:this.src='./themes/buttons/sendBtn.png'" />
            <img id="cancelBtn" alt="CancelButton" src="themes/buttons/CancelBtn.png" class="clickable"
                title="Cancel" onclick="SlideOut(0,'top','OUT')" onmouseover="javascript:this.src='themes/buttons/cancelBtn-on.png'"
                onmouseout="javascript:this.src='themes/buttons/cancelBtn.png'" />
            <div id="EnqMessageDiv" runat="server" style="display: none;">
                <img src="./themes/cross.png" alt="Invalid: " runat="server" id="MessageImg" style="width: 16px;
                    height: 16px;" />
                <asp:Label runat="server" ID="MessageLbl"></asp:Label>
            </div>
        </div>
    </div>
</telerik:RadAjaxPanel>
<telerik:RadScriptBlock ID="rsb" runat="server">
    <script type="text/javascript">
        function SendEnquiry()
        {
            var oAjax = <%= rap.ClientID %>;
            var txtBx = document.getElementById("EnqTxtBx");
            var EnqTxt = txtBx.value;
            oAjax.ajaxRequest("Enq|"+EnqTxt+"|");
        }
    </script>
</telerik:RadScriptBlock>
<telerik:RadAjaxLoadingPanel ID="ralp" Runat="server" Skin="Default" Transparency="50">
</telerik:RadAjaxLoadingPanel>

protected void rap_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e)
        {
            string[] Args = e.Argument.Split('|');
 
            if (Args[0] == "Enq")
            {
                ..... Process data .....
 
                if (dnCustom.strFuncs.isValidEmail(EmailBx.Text))
                {
                    if (!PromatMail.SendMail())
                    {
                        BlankFields();
                        rap.ResponseScripts.Add("alert('Sorry! We are experiencing errors in our mail server at this time. Please try again later'); SlideOut(0,'top','OUT');");
                    }
                    else
                    {
                        BlankFields();
                        if (!CustMail.SendMail())
                        {
                            rap.ResponseScripts.Add("alert('Thankyou for your enquiry we will get back to as soon as possible'); SlideOut(0,'top','OUT');");
                        }
                        else
                        {
                            rap.ResponseScripts.Add("alert('Thankyou for your enquiry we will get back to as soon as possible'); SlideOut(0,'top','OUT');");
                        }
                    }
                }
                else
                {
                    rap.ResponseScripts.Add("alert('The Email address you supplied is invalid. please amend it and try again.');");
                }
            }
        }


Thanks in advance,

M
Maria Ilieva
Telerik team
 answered on 19 Nov 2010
1 answer
70 views
Hi,

I have a grid having a DetailTable. If I try to group with a column in DetailTable ,Feilds are not binding Properly.
Some Columns are showing values of some other fields and Some Columns are missing.
Please help me to solve this issue.
Tsvetina
Telerik team
 answered on 19 Nov 2010
5 answers
129 views
Hi,
  In my application, I let the user pick a date range, then click on the button to retrieve all appointments in the specified date range.  Sometimes the user get an error like folowing:

Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12030

  After debugging my application, I found out Radscheduler can only load 13000 appointments.  If it's over 14000 appointments, it will crash.

  I want somebody from Telerik to verify this for me and see if this a limitation for the radscheduler.

thanks.
Nikolay Tsenkov
Telerik team
 answered on 19 Nov 2010
1 answer
117 views
Hello everyone,

  Did a bit of searching on these forums and haven't found the solution to my problem -- this being said, my apologies if this is a repost!

  I have managed to get Rad Editor Lite to run on WSS 3, and have activated the CSS Styles icon on in the Lists web part (ApplyClass, that is). I seem to be having some serious interaction issues, though! For instance, I try to select some text to apply a CSS class to it, click on the styles dropdown, try to select a style and -- nothing happens. I do notice that the selected text is no longer selected.

  Also, I've noticed that there are times when I apply a CSS style (after a frustratingly long amount of times trying to select-and-apply styles the control finally registers my request) and nothing happens but the selected text remains selected. It seems that in this particular case the style has been applied but has been overwritten by other styles applied to the text.

  Note that in my case the styles stick, whether in Edit mode or not. The problem is that, during editing, the user is tearing her hair out trying to get the styles applied correctly. She could of course set a font size, color, etc -- but that puts the onus on her to make sure everything stays consistent. Not ideal.

  Does anyone know anything about this problem? Definitely happens on both IE and Firefox.
Stanimir
Telerik team
 answered on 19 Nov 2010
1 answer
407 views
I followed your example Grid / Update/Insert/Delete in Hierarchy (http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/threelevel/defaultcs.aspx ) and did my own grid with my data. The Apps works just fine. I used the defaultVB.aspx example
My question is for example how can i make Contact Name or Company a text Area when i edit. When you click on edit it is just like a textbox.

In this example http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/extractvalues/defaultcs.aspx
Shipping address is a textarea but i am not able to find where shipping address is defined as text area.

Thanks
 
Daniel
Telerik team
 answered on 19 Nov 2010
1 answer
99 views
Dear telerik team,
I am getting issue while setting radstar value in decimal. for example when I set the radstar value 2.6 or 2.3 it's still displaying only 2 star rated not 2 and half.

I have done following code on page_load

RadRating

 

radRating = new RadRating();

 

 


radRating.ItemCount = 5;

radRating.SelectionMode =

RatingSelectionMode.Continuous;

 

radRating.Precision =

 

RatingPrecision.Exact;

 

radRating.Value = 5/2;

when page loads only 2 star are displaying dark means rated not '2 and half' star. or when radRating.Value = 9/2; it shows only 4 star shadowed(rated).

how it could be resolved please suggest me.

 

Tsvetie
Telerik team
 answered on 19 Nov 2010
2 answers
122 views
I am using a grid control witch is created dynamically from server but am facing a problem.The delete button never fires the event DeleteCommand.Below is my c# code

private void GridPowerControl()
{
    RadGrid1.Columns.Clear();
 
    RadGrid1.PageSize = 5;
    RadGrid1.AllowPaging = true;
    RadGrid1.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric;
    RadGrid1.AutoGenerateColumns = false;
    RadGrid1.ShowStatusBar = true;
     
    RadGrid1.MasterTableView.EditFormSettings.UserControlName = ControlS.POWER_CONTROL;
    RadGrid1.MasterTableView.EditFormSettings.EditFormType = Telerik.Web.UI.GridEditFormType.WebUserControl;
 
    RadGrid1.MasterTableView.PageSize = GlobalParams._PageRowNum;
    RadGrid1.MasterTableView.Width = Unit.Percentage(100);
    RadGrid1.MasterTableView.CommandItemDisplay = Telerik.Web.UI.GridCommandItemDisplay.Top;
    RadGrid1.MasterTableView.DataKeyNames = new string[] { "ID" };
 
    GridEditCommandColumn editColumn;
    editColumn = new GridEditCommandColumn();
    editColumn.UniqueName = "EditCommandColumn";
    RadGrid1.MasterTableView.Columns.Add(editColumn);
 
    GridButtonColumn deleteButton;
    deleteButton = new GridButtonColumn();
    deleteButton.UniqueName = "Delete";
    deleteButton.Text = Resources.Global.DELETE;
    deleteButton.CommandName = "Delete";
    RadGrid1.MasterTableView.Columns.Add(deleteButton);
 
    GridBoundColumn boundColumn;
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Name";
    boundColumn.UniqueName = "Name";
    boundColumn.HeaderText = Resources.Global.NAME;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Tag";
    boundColumn.UniqueName = "Tag";
    boundColumn.HeaderText = Resources.Global.TAG;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Info";
    boundColumn.UniqueName = "Info";
    boundColumn.HeaderText = Resources.Global.INFO;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
    boundColumn = new GridBoundColumn();
    boundColumn.DataField = "Geotag";
    boundColumn.UniqueName = "Geotag";
    boundColumn.HeaderText = Resources.Global.GEO_TAG;
    RadGrid1.MasterTableView.Columns.Add(boundColumn);
 
}
protected void RadGrid1_DeleteCommand(object source, GridCommandEventArgs e)
{
    string Test = string.Empty;
}
 
and this is the asp code
<telerik:RadGrid ID="RadGrid1" runat="server" GridLines="None"
    AllowPaging="True" CssClass="RadGrid"
    AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="True"
    OnNeedDataSource="RadGrid1_NeedDataSource" OnUpdateCommand="RadGrid1_UpdateCommand"
    OnInsertCommand="RadGrid1_InsertCommand"
    OnDeleteCommand="RadGrid1_DeleteCommand">
    <MasterTableView>
    <RowIndicatorColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </RowIndicatorColumn>
 
    <ExpandCollapseColumn>
    <HeaderStyle Width="20px"></HeaderStyle>
    </ExpandCollapseColumn>
    </MasterTableView>
 
    <ClientSettings>
        <ClientEvents OnRowDblClick="RowDblClick" />
    </ClientSettings>
</telerik:RadGrid>
Can someone help me with my problem.Thank you
Leuk
Top achievements
Rank 1
 answered on 19 Nov 2010
2 answers
273 views
I started using the radtreelist and i'm very happy with it.

But i have a  page which needs to be refreshed every 10 seconds. I do this with a javascript timeout that is done when the radtreelist is created.

In a radgrid you have the function rebind() of the mastertableview. Is there something like that in the radtreelist? 

Currently i'm doing this but that doesn't work as i expected:
var treelist = $find("<%= rtlClusterStatus.ClientID %>");
treelist.fireCommand("Rebind","");

Am I doing something wrong or is this function currently not implemented?
Sander Notenbomer
Top achievements
Rank 1
 answered on 19 Nov 2010
1 answer
84 views

Removing RadFormDecorator  solves the RadButton problem but then all my asp:Buttons are displayed without the skin.
I also tried to replace all the asp:Buttons with RadButtons but that opens a whole new pandora's box with javascript errors etc.
Is there a way to not use RadFormDecorator but still apply skin to asp:Button controls?
Bozhidar
Telerik team
 answered on 19 Nov 2010
3 answers
176 views
I have created a server control which inherits from the TadDatePicker web control using the code below.  It appears that all of the serverside properties and methods work flawlessly when I place my "DatePicker" control onto an ASP.NET webform.

 

 

    public class DatePicker : Telerik.Web.UI.RadDatePicker  
    {  
        protected override void OnLoad(EventArgs e)  
        {  
            //set default properties  
            Skin = "WebBlue";  
            Calendar.Skin = "WebBlue";  
            DateInput.Skin = "WebBlue";  
            DateInput.BackColor = System.Drawing.Color.White;  
            DateInput.Font.Bold = true;  
            Calendar.ShowRowHeaders = false;  
            Width = Unit.Pixel(120);  
              
            base.OnLoad(e);  
        }  
    } 

BUT.... When I try to access the client-side API I am not able to access any of the built-in methods or properties.  For example, I have a page with a dropdown on it.  When the dropdown's selection is chnaged, I am trying to clear the contents of my DatePicker control using javascript. Here is the code of a user control that encpsulates my server controls and the javascript:

 

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucAssessmentTimePeriodSelection.ascx.cs" Inherits="BYOA.Admin.UserControls.ucAssessmentTimePeriodSelection" %> 
<%@ Register Assembly="SSG.WebControls" Namespace="SSG.WebControls.ServerControls" TagPrefix="cc2" %> 
<%@ Register Assembly="BYOA.Admin" Namespace="BYOA.Admin.ServerControls" TagPrefix="cc1" %> 
 
<script type="text/javascript">  
 
    function ClearDate()  
    {  
        var datePicker = document.getElementById('<%= dtStartDate.ClientID %>');  
        alert(datePicker.name);
        datePicker.clear();  
    }  
      
    function ClearTestingPeriod(sender, eventArgs)  
    {  
        var ddlTestingPeriod = document.getElementById('<%= ddlTestingPeriod.ClientID %>');  
        ddlTestingPeriod.selectedIndex = 0;  
    }  
</script> 
 
 
<cc1:TestingPeriodDropDownList runat="server" ID="ddlTestingPeriod" onChange="ClearDate();"></cc1:TestingPeriodDropDownList><br><br> 
 
<cc2:DatePicker runat="server" ID="dtStartDate">  
    <ClientEvents OnDateSelected="ClearTestingPeriod" /> 
</cc2:DatePicker> 
 

The error I am getting when the dropdown is changed is on the line "datePicker.clear();" which is:

"Object doesn't support this property or method."

I am able to do an alert(datePicker.name) and it works just fine, so I know that I at least am getting a reference to the object.  It appears that it does not understand the type of the object and that it is a RadDatePicker, and therefore doees not know what "obj.clear()" is.  Any help would be MOST appreciated!

 

vaibhav
Top achievements
Rank 1
 answered on 19 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?