Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
195 views
i read http://www.telerik.com/help/aspnet-ajax/ajxaddajaxrequesttoclientevent.html and made a similar demo, when client-side call
the TextBoxCustomAjax function to use Ajax send the request to server, server-side event RadAjaxManager1_AjaxRequest can be fired, and Label1.Text also updated value, but client-side cannot see any the updated result, why? i'm using RadControls 2010 for Ajax asp.net and VS 2010, these are my full demo code:
///////////////////////////////////////////////////////////////////////////////AddAjaxToHtmlElement.aspx///////////////////////////////////////////////////
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddAjaxToHtmlElement.aspx.cs" Inherits="AddAjaxToHtmlElement"  %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        //Put your JavaScript code here.
        function TextBoxCustomAjax(eventArgs) {
            $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest(eventArgs);
        }
    </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" >

    </telerik:RadAjaxManager>
    <div>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="300px">
             <asp:Label ID="Label1" runat="server" Text="Label1" /><br />
             <asp:TextBox ID="TextBox1" runat="server"
                 onkeyup="TextBoxCustomAjax('TextBox1');" type="text" /> <br />
        </telerik:RadAjaxPanel>

    </div>
    </form>
</body>
</html>
///////////////////////////////////////////////////////////////////////////////////////////////////////AddAjaxToHtmlElement.aspx.cs/////////////////////////////////////////////////////////
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;

public partial class AddAjaxToHtmlElement : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        RadAjaxManager1.AjaxRequest += RadAjaxManager1_AjaxRequest;
    }
    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        if (e.Argument == TextBox1.ClientID)
        {
            Label1.Text = TextBox1.Text;
            Page.Title = TextBox1.Text;
        }
    }
}
/*
  note :
            Label1.Text = TextBox1.Text;
            Page.Title = TextBox1.Text;
    Page.Title can be updated, but Label1.Text cannot be updated!!!
    why??
*/
Pavel
Telerik team
 answered on 26 Oct 2010
1 answer
78 views
Hello!

Guys, I need help using your scheduling control as I'm finding myself in a troubled scenario. I'm attaching a cut-down version of my database.

I require a schedule in the form of an organizer. Required design concept excel and image attached.

Some facts:
  • Every Locum can have a maximum of two Jobs in a single day. So the maximum items (jobs) available per day is two.

I hope you guys can help me out.

--
Regards,
Hassan Gulzar
Peter
Telerik team
 answered on 26 Oct 2010
1 answer
186 views
I need to use StateServer mode for session state in my application, but doing so returns the error: "Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom session state store in 'Custom' mode."

I'm using the .cs example code from \Telerik\RadControls for ASP.NET AJAX Q2 2010\Live Demos\Grid\Examples\Programming\DragAndDrop folder.  Is there any way to get this code to work using StateServer sessionState mode rather than InProc mode?
Daniel
Telerik team
 answered on 26 Oct 2010
1 answer
59 views
Hi Telerik,

Am using radgrid with filter enabled. Is there any way in radgrid to access the filtered result set before it binds to the Grid. Or any event which is fired before the filtered data is bound to the Grid? Please give me a solution for this as soon as possible.

Thanks
Priya
Marin
Telerik team
 answered on 26 Oct 2010
2 answers
183 views
Hi There,

we recently decided to begin the process of upgrading our product so that it becomes compatible with Telerik RadControls ASP.NET AJAX. We've spent a number of days now reading different KB articles and watching some upgrade videos but have been running into the same problems regardless. Our product is a .NET 2.0 application with no prior use of AJAX, so we also had to look into editing the web.config so that it supports System.Web.Extensions. 

There have been two errors that visual studio constantly prompts us about once we go through the process of replacing the register directive with 'Telerik.Web.UI' and then deleting the older DLLs. (We are also receiving errors for Telerik.Charting but this is another story i think...)

 ASP.NET runtime error: The base class includes the field 'radGdUserGroup', but its type (Telerik.WebControls.RadGrid) is not compatible with the type of control (Telerik.Web.UI.RadGrid). <<FILENAME>>

ASP.NET runtime error: Could not load file or assembly 'RadTreeView.Net2' or one of its dependencies. The system cannot find the file specified.  <<FILENAME>>

We really hope that you guys can assist in helping to remove these errors from our solution so that we can continue using the Telerik suite.

Regards

A.

Mak
Top achievements
Rank 1
 answered on 26 Oct 2010
1 answer
54 views

Hello all,
 

I have a form which has 7 grids, one grid per weekday.

For each grid I dynamically create a datatable because the column layout can change.

I use a HeaderTemplate because I need to merge headers, an ItemTemplate and an EditTemplate.

 

The form is displayed correctly, however I’d like all rows to be directly in EditMode, which I set in the PreRender event.

When I then trigger the Rebind event, it takes endlessly (up to 40 seconds) until the form is displayed. If I disable the EditMode, it’s displayed right away. (See attached pictures)

 
Any help would be appreciated.

 

Ulrich

Marin
Telerik team
 answered on 26 Oct 2010
1 answer
82 views

Hi,

I have created a custom GridColumnEditor that extends GridTextColumnEditor. My custom editor holds a composite control (consisting of a textbox and some other controls) that is used for editing the value. The composite controls shows up with the correct value when I press the edit button, but I have problems extracting the new value when I press the save button, I always get the old value.

I use the following for extracting the new value: (EditItem.Value (which is the textbox value)  always has the old value)


List
<UIPhaseItem> items = new List<UIPhaseItem>();

foreach
(GridColumn column in e.Item.OwnerTableView.RenderColumns)
{
    if (column is IGridEditableColumn)
    {
        IGridEditableColumn editableCol = (column as IGridEditableColumn);
        if (editableCol.IsEditable)
        {
            IGridColumnEditor editor = editManager.GetColumnEditor(editableCol);
            if (editor is CustomColumnEditor)
            {
                items.Add(((CustomColumnEditor)editor).EditItem);     
            }
        }
    }
}

Any ideas?

Below is my custom column editor.

public class CustomColumnEditor : GridTextBoxColumnEditor
    {
        Public UIPhaseItem EditItem { get; set;}
  
        public CustomColumnEditor(UIPhaseItem item, long id)
        {
            this.EditItem = item;
            this.EditItem.Enabled = true;
            this.EditItem.Visible = true;
            this.EditItem.ID = id.ToString();
        }
  
        protected override void AddControlsToContainer()
        {
            this.ContainerControl.Controls.Add(EditItem);
        }
  
        protected override void LoadControlsFromContainer()
        {
            this.EditItem = (UIPhaseItem)this.ContainerControl.Controls[0];
        }
}
Marin
Telerik team
 answered on 26 Oct 2010
3 answers
60 views
I use client function "radopen" to open RadWindow and show one page in it. 

Scenario: RadWindow is closed, main page is showed. After a while the session expires and, not knowing that, I open RadWindow and it show login page inside (!!!) which is completely wrong and inappropriate to me.

Can RadWindow somehow be limited to display only the page I told him, and if he can not, to close? Login page is not intended there to be loaded!
Georgi Tunev
Telerik team
 answered on 26 Oct 2010
3 answers
61 views
Hi,

I created radgrid edit option. when i open edit option it is fine. but when i clicked enter button in keyboard it is open create new option. i want solution.

Thanks
Dhamu.
Dhamodharan
Top achievements
Rank 1
 answered on 26 Oct 2010
3 answers
386 views
Hello,

I'm wonder if I can insert, update and delete records from Resource.resx file, exactly like handling a data from database using the radgrid control.
Is it is possible can you please explain to how can I do that,

It is apprecited to send me a code .

Regards,
Bader
Vasil
Telerik team
 answered on 26 Oct 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?