Runtime error in Microsoft JScript: 'attributes' is Null or not an object
at Line 1900 in Telerik.Web.Ui.Webresource_1.axd
if(_2e["attributes"]){
this.get_attributes()._load(_2e["attributes"]);
}
I assume now, that RadComboBox is only useable when a ViewState is available. If yes, can you tell me which other controls are dependent of the ViewState? And if no, can you tell me what I am doing wrong? Here is my code:
In the MasterPage:
<% using(Html.BeginForm()) { %>
<telerik:RadScriptManager ID="mainRadScriptManager" runat="server" EnableTheming="True" />
......
In the View:
<%
categoryRadComboBox.DataSource = ViewData[
ProductController.Identifiers.DataSources.Categories];
categoryRadComboBox.DataBind();
%>
<telerik:RadComboBox ID="categoryRadComboBox" Runat="server"
AutoPostBack="True" DataTextField="Name"
DataValueField="ProductCategoryID" Height="66px" Width="250px" Skin="Default" MaxHeight="400px">
</telerik:RadComboBox>
And in the Controller:
string categoryValue = RadControlHelper.ExtractComboBoxValue(Request, Identifiers.Controls.CategoriesComboBox);
AdventureWorksDataContext context = new AdventureWorksDataContext();
var categories = from category in context.ProductCategories
orderby category.Name
select new { category.Name, category.ProductCategoryID };
ViewData[
Identifiers.DataSources.Categories] = categories.ToList();
Thanks for your help and best regards.
Hans
protected void FactorTypeList_SelectedIndexChanged(object source, RadComboBoxSelectedIndexChangedEventArgs e)
{
//Identify the Factor Type Column/ComboBox.
GridTemplateColumn FactorTypeColumn = (GridTemplateColumn)CRFGrid.Columns.FindByDataField("FactorType.Name");
RadComboBox FactorTypeComboBox = (RadComboBox)FactorTypeColumn.CurrentColumnEditor.ContainerControl.FindControl("FactorTypeList");
//Identify the Factor Column/ComboBox.
GridTemplateColumn FactorColumn = (GridTemplateColumn)CRFGrid.Columns.FindByDataField("Factor.Name");
RadComboBox FactorComboBox = (RadComboBox)FactorColumn.CurrentColumnEditor.ContainerControl.FindControl("FactorList");
////Check on the currently selected item.
if (FactorTypeComboBox.SelectedIndex == 0)
{
//The User has deselected the item so all Factors should be available.
FactorComboBox.DataSource = FactorDataSource;
FactorComboBox.DataBind();
}
else
{
//Update the Factor ComboBox with the Factors for the selected Factor Type.
SustainmentDataClassesDataContext ctx = new SustainmentDataClassesDataContext();
var FactType = from p in ctx.FactorTypes
where p.Name == FactorTypeComboBox.Text
select p;
if (FactType != null)
{
FactorType found = FactType.First<FactorType>();
FactorComboBox.DataSource = found.Factors;
FactorComboBox.DataBind();
}
}
}
Here is my GridTemplateColumn in the markup:
<%
-- Factor Column--%>
<telerik:GridTemplateColumn
DataField="Factor.Name"
HeaderText="<%$ Resources:Sustain, Factor %>">
<headerstyle width="120" />
<EditItemTemplate>
<telerik:RadComboBox
id="FactorList"
runat="server"
skin="Vista"
allowcustomtext="false"
datasourceid="FactorDataSource"
datavaluefield="Id"
datatextfield="Name"
SelectedValue='<%# Bind("FactorId") %>'
AppendDataBoundItems="True"
AutoPostBack="True"
OnSelectedIndexChanged="FactorList_SelectedIndexChanged"
CausesValidation="false">
<Items>
<telerik:RadComboBoxItem
runat="server"
Text="<%$ Resources:Grid, EmptyListItemText%>"
Value="-1" />
</Items>
</telerik:RadComboBox>
<span style="color: Red">*</span>
<asp:CompareValidator
ID="CompareValidatorFactor"
ValueToCompare="<%$ Resources:Grid, EmptyListItemText%>"
Operator="NotEqual"
ControlToValidate="FactorList"
ErrorMessage="<%$ Resources:Sustain, ValidationText_MandatoryField%>"
runat="server"/>
</asp:CompareValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label
id="lblFact"
runat="server"
Text='<%# Eval("FactorName") %>'>
</asp:Label>
</ItemTemplate>
</telerik:GridTemplateColumn >
I am in a bit of a rush to get this done and its really frustrating so any help would be greatly appreciated.
Thanks,
Martin
string
[] allowedFileExtensions = new string[2] { ".zip", ".doc" };
RadUpload1.AllowedFileExtensions = allowedFileExtensions;
<
telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".zip,.doc">
</telerik:RadUpload>
still not working, it is still showing the default one.
Please help

Hi,
I am having following unexpected behavior:
After canceling request when a file is too big, when I am selecting another file, args._progressData.RadUpload.RequestSize is from previous file and not from one which I just selected.