Hi,
I am writing a server composite control which would reuse some of the RadComboBox functionality. When running a page which uses that control I am getting a JavaScript error (see the bottom of my post). I have narrowed the problem down to the RadComboBox itself. Is there any known fix to that?
Here is my server control (stripped as much as I can to produce the problem) :
A page using the control (again, stripped down to just the control itself) :
The javascript error I am getting is:
'undefined' is null or not an object Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9d03845-da3c-45e9-ab05-79ee502af576%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af9722142-3e1c-4803-86df-ecfc0d24f144%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d, line 6 character 74101
Please help, it is urgent. If you need any additional data please let me know and I will provide it if I can.
Thanks,
Daniel Gruszczyk
I am writing a server composite control which would reuse some of the RadComboBox functionality. When running a page which uses that control I am getting a JavaScript error (see the bottom of my post). I have narrowed the problem down to the RadComboBox itself. Is there any known fix to that?
Here is my server control (stripped as much as I can to produce the problem) :
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Linq;
using
System.Text;
using
System.Web;
using
System.Web.UI;
using
System.Web.UI.WebControls;
using
Telerik.Web.UI;
namespace
ServerControl1
{
[ToolboxData(
"<{0}:ScapaLoad runat=server></{0}:ScapaLoad>"
)]
public
class
ScapaLoad : CompositeControl
{
RadComboBox _combo;
[
Category(
"Data"
),
Description(
"Data source ID for populating combo box"
),
PersistenceMode(PersistenceMode.Attribute)
]
public
string
DataSourceID
{
get
{
EnsureChildControls();
return
_combo.DataSourceID;
}
set
{
EnsureChildControls();
_combo.DataSourceID = value;
}
}
[
Category(
"Data"
),
Description(
"Database field with value to be used as a value of each combo box element"
),
PersistenceMode(PersistenceMode.Attribute)
]
public
string
DataValueField
{
get
{
EnsureChildControls();
return
_combo.DataValueField;
}
set
{
EnsureChildControls();
_combo.DataValueField = value;
}
}
[
Category(
"Data"
),
Description(
"Database field to be used as a visible text for chosen element from combo box"
),
PersistenceMode(PersistenceMode.Attribute)
]
public
string
DataTextField
{
get
{
EnsureChildControls();
return
_combo.DataTextField;
}
set
{
EnsureChildControls();
_combo.DataTextField = value;
}
}
protected
override
void
CreateChildControls()
{
Controls.Clear();
_combo =
new
RadComboBox();
Controls.Add(_combo);
}
protected
override
void
RecreateChildControls()
{
EnsureChildControls();
}
protected
override
void
Render(HtmlTextWriter writer)
{
AddAttributesToRender(writer);
_combo.RenderControl(writer);
}
}
}
A page using the control (again, stripped down to just the control itself) :
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<%@ Register Assembly="ServerControl1" Namespace="ServerControl1" TagPrefix="aspSample" %>
<%@ 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
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
runat
=
"server"
/>
<
asp:LinqDataSource
ID
=
"LinqDataSource1"
runat
=
"server"
EnableDelete
=
"true"
ContextTypeName
=
"TestLinqDataContext"
EntityTypeName
=
""
TableName
=
"Users"
>
</
asp:LinqDataSource
>
<
aspSample:ScapaLoad
ID
=
"ScapaLoad1"
runat
=
"server"
DataSourceID
=
"LinqDataSource1"
DataValueField
=
"Name"
DataTextField
=
"Name"
/>
</
div
>
</
form
>
</
body
>
</
html
>
The javascript error I am getting is:
'undefined' is null or not an object Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3ac9d03845-da3c-45e9-ab05-79ee502af576%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3af9722142-3e1c-4803-86df-ecfc0d24f144%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d, line 6 character 74101
Please help, it is urgent. If you need any additional data please let me know and I will provide it if I can.
Thanks,
Daniel Gruszczyk