<
telerik:RadAsyncUpload
ID
=
"FileUpload1"
runat
=
"server"
Skin
=
"Forest"
Width
=
"272px"
>
</
telerik:RadAsyncUpload
>
<
asp:Button
ID
=
"btnUpload"
Width
=
"180px"
Height
=
"30px"
runat
=
"server"
Text
=
"Upload"
onclick
=
"btnUpload_Click"
/>
<
telerik:AjaxSetting
AjaxControlID
=
"btnUpload"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"btnUpload"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"FileUpload1"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"lblMessage"
LoadingPanelID
=
"RadAjaxLoadingPanel1"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
Uncaught TypeError: Cannot read property 'id' of undefined
and chrome gives more info like
Uncaught TypeError: Cannot read property 'id' of undefined Telerik.Web.UI.WebResource.axd:2889
Telerik.Web.UI.RadAjaxControl._initializeRequest Telerik.Web.UI.WebResource.axd:2889
H.z.callBaseMethod Telerik.Web.UI.WebResource.axd:3
Telerik.Web.UI.RadAjaxManager._initializeRequest Telerik.Web.UI.WebResource.axd:3463
(anonymous function) Telerik.Web.UI.WebResource.axd:3
(anonymous function) Telerik.Web.UI.WebResource.axd:3
H.w.raiseEvent Telerik.Web.UI.WebResource.axd:3
e._onFormSubmit Telerik.Web.UI.WebResource.axd:9
e._doPostBack Telerik.Web.UI.WebResource.axd:9
(anonymous function) Telerik.Web.UI.WebResource.axd:3
onclick
Hi,
I followed instructions from here http://docs.telerik.com/devtools/aspnet-ajax/controls/window/how-to/how-to-use-radwindow-with-ajax to build updatepanel into a RadWindow ContentTemplate.
When I use <embed> or <object> tags in the ContentTemplate the AJAX breaks and switches to full postbacks.
Seems obvious as object and embed tags create their own DOMs...anyone aware of a solution to workaround this? Sorry for the offtopic.
Marc
Hello,
I'm using the below code to setup a grid. The columns don't stay frozen when I am using the keyboard to navigate the grid.
<ClientSettings AllowKeyboardNavigation="true" >
<Selecting AllowRowSelect="false" EnableDragToSelectRows="false" CellSelectionMode="SingleCell" />
<Scrolling UseStaticHeaders="false" AllowScroll="true" ScrollHeight="100%" FrozenColumnsCount="5"
EnableColumnClientFreeze="true" SaveScrollPosition="true" />
<KeyboardNavigationSettings AllowSubmitOnEnter="true" EnableKeyboardShortcuts="true" SaveChangesKey="S" />
Any help on this would be much appreciated.
Hi,
When I export my grid to an excel file (ExcelML), I need to hide some column in this excel file (same as when you hide a column in excel). How can I do that?
Thx.
I am using a RadGrid in Batch Edit mode.
When RenderMode is set to "Classic" (or not set at all), I can see the dirty indicators for changed cells.
When RenderMode is set to "Lightweight", I no longer see the dirty indicators.
Is this expected behavior? Or should I be able to see dirty indicators in Lightweight mode for a Batch Edit RadGrid?
Hello everybody,
I know that this error has a lot of documentation on the forum/documentation but not any of the given solutions has worked for me...
I have a website that uses telerik, everything works fine but when I try to deploy it on an Integrated IIS 8.5, I have the following error on my page :
The assembly is copied into the bin folder but doesn't seems to be loaded
http://www.telerik.com/blogs/web-resources-demystified-part-3-troubleshooting
I don't see any failed request...
I added the following line to the system.webserver in web.config in addition with the ones given there : http://docs.telerik.com/devtools/aspnet-ajax/general-information/web-config-settings-overview
<
handlers
>
<
add
name
=
"Telerik.Web.UI.WebResource"
path
=
"Telerik.Web.UI.WebResource.axd"
verb
=
"*"
type
=
"Telerik.Web.UI.WebResource"
/>
</
handlers
>
But the problem persists...
I have no clue on how to resolve this issue
THank you for your support,
Bests regards, Nicolas.
The Rotator is displaying 4 buttons... Up, Down, Left, Right.
How can I hide, Up and Down?
Thanks.
JC
I amusing this technique to set an edit link in a grid template column.
editlink.Attributes.Add("href", "#");
editlink.Attributes.Add("onclick", string.Format("return ShowEditForm('{0}','{1}');", e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["SubscriberID"], e.Item.ItemIndex));
In the past, I have called a telerik window with a separate aspx page that would display the detail record data for the ID that was passed in the querystring.
I am now working with bootstrap and would like to do this with a bootstrap modal.
Are there any examples where this has been done?
Hi,
Well i am new to Sitefinity. I was trying to implement Dynamic Sorting Filtering and Pagination in client side. I have implemented sorting and pagination. I want to implement excel type filtering as explained in the demo ( http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/excel-like-filtering/defaultcs.aspx) to my department column. The issue is i cant use FilterType="HeaderContext". I get a issue saying The values permitted for this attribute dosent inclue HeaderContext. I went to multiple article but couldn't figure out. Can you please help me out. The other issue is i am binding my radgrid in ajax call i don't know how to bind the data for the filtering in ajax call and how to pass filter data from ajax call to webservice.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test.aspx.cs" Inherits="SitefinityWebApp.Pages.test" EnableEventValidation="true" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<%@ Register TagPrefix="sf" Assembly="Telerik.Sitefinity" Namespace="Telerik.Sitefinity.Web.UI.PublicControls" %>
<html xmlns='http://www.w3.org/1999/xhtml'>
<head runat="server">
<title>Telerik ASP.NET Example</title>
<telerik:RadScriptBlock ID="RadCodeBlock" runat="server">
<script type="text/javascript">
function rad_gridCreated(sender, args) {
tableView = $find("<%= gridData.ClientID %>").get_masterTableView();
makeServiceCall(updateGrid, serviceFailure);
};
function serviceFailure(error) { alert("failure " + error.statusText); };
function updateGrid(result) {
tableView.set_dataSource(result.employee);
tableView.dataBind();
tableView.set_virtualItemCount(result.totalCount);
};
function getRequestStringfyData(startIndex, pageSize, sortExpression, filterExpression) {
return JSON.stringify({
startIndex: startIndex,
maximumRows: pageSize,
sortExpression: sortExpression,
filterExpression: filterExpression
});
};
function makeURL(startIndex, pageSize, sortExpression, filterExpression) {
return "/CustomServices/NewsService/getmyWork?startIndex=" + startIndex + "&maximumRows=" + pageSize + "&sortExpression=" + sortExpression + "&filterExpression=" + filterExpression;
};
function makeServiceCall(onCallBackSuccess, onCallbackFailure) {
var pageSize = tableView.get_pageSize(); var startIndex = (tableView.get_currentPageIndex() * pageSize);
var sortExpression = tableView.get_sortExpressions().toString(); var filterExpression = "";
$.ajax({
type: "GET",
url: makeURL(startIndex, pageSize, sortExpression, filterExpression),
dataType: "json",
data: getRequestStringfyData(startIndex, pageSize, sortExpression, filterExpression),
contentType: "application/json; charset=utf-8",
processData: true,
success: onCallBackSuccess,
error: onCallbackFailure
});
};
function radgrid_OnCommand(sender, args) {
tableView = sender.get_masterTableView();
makeServiceCall(updateGrid, serviceFailure);
};
</script>
</telerik:RadScriptBlock>
</head>
<body>
<form id="form1" runat="server">
<script type="text/javascript" src="test.js"></script>
<telerik:RadScriptManager runat="server" ID="RadScriptManager1">
<Scripts>
<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>
<div style="margin-top: 100px;">
<asp:UpdatePanel ID="ProductsUpdatePanel" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">
<ContentTemplate>
<telerik:RadGrid RenderMode="LightWeight" ID="gridData" name="gridData" runat="server" EnableViewState="false" AutoGenerateColumns="false" AllowPaging="true" PageSize="10" AllowSorting="true" FilterType="HeaderContext">
<MasterTableView TableLayout="Fixed">
<Columns>
<telerik:GridBoundColumn DataField="EmpID" HeaderText="Emp ID" ReadOnly="true" SortExpression="EmpID" UniqueName="EmpID" />
<telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" ReadOnly="true" SortExpression="FirstName" UniqueName="FirstName" />
<telerik:GridBoundColumn DataField="LastName" HeaderText="Last Name" ReadOnly="true" SortExpression="LastName" UniqueName="LastName" />
<telerik:GridBoundColumn DataField="Department" HeaderText="Department" ReadOnly="true" SortExpression="Department" UniqueName="Department" />
</Columns>
</MasterTableView>
<ClientSettings EnablePostBackOnRowClick="false">
<ClientEvents OnCommand="radgrid_OnCommand" OnGridCreated="rad_gridCreated" />
</ClientSettings>
</telerik:RadGrid>
</ContentTemplate>
</asp:UpdatePanel>
</div>
</form>
</body>
</html>
Interface
namespace SitefinityWebApp.CustomServices
{
[ServiceContract]
[AllowDynamicFields]
public interface INewsService
{
[OperationContract]
[WebInvoke(Method = "GET", UriTemplate = "getmyWork?startIndex={startIndex}&maximumRows={maximumRows}&sortExpression={sortExpression}&filterExpression={filterExpression}", ResponseFormat = WebMessageFormat.Json, RequestFormat = WebMessageFormat.Json)]
SitefinityWebApp.CustomServices.NewsService.DynamicItemsContext DoWork(int startIndex, int maximumRows, string sortExpression, string filterExpression);
}
wcf class
[ServiceBehavior(IncludeExceptionDetailInFaults = true, InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]
[AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
public class NewsService : INewsService
{
public DynamicItemsContext RetrieveItems(int startIndex, int maximumRows, string sortExpression)
{
DynamicModuleManager dynamicModuleManager = DynamicModuleManager.GetManager();
Type testType = TypeResolutionService.ResolveType("Telerik.Sitefinity.DynamicTypes.Model.Employees.Employee");
var dynamicItems = dynamicModuleManager.GetDataItems(testType).Where(d => d.Status == Telerik.Sitefinity.GenericContent.Model.ContentLifecycleStatus.Master);
if (!string.IsNullOrEmpty(sortExpression))
dynamicItems = dynamicItems.OrderBy(sortExpression);
List<Employee> employees = new List<Employee>();
foreach (var item in dynamicItems)
{
var employee = new Employee();
employee.FirstName = item.GetValue("FirstName").ToString();
employee.LastName = item.GetValue("LastName").ToString();
employee.Department = item.GetValue("Department").ToString();
employee.EmpID = item.GetValue("EmpID").ToString();
employees.Add(employee);
}
var dynamicItemContext = new DynamicItemsContext();
dynamicItemContext.totalCount = employees.Count;
dynamicItemContext.employee = employees;
dynamicItemContext.employee = dynamicItemContext.employee.Skip(startIndex).Take(maximumRows);
// employees.Skip(startIndex).Take(maximumRows);
return dynamicItemContext;
}
public DynamicItemsContext DoWork(int startIndex, int maximumRows, string sortExpression, string filterExpression)
{
var items = RetrieveItems(startIndex, maximumRows, sortExpression);
return items;
}
public class Employee
{
public string FirstName { get; set; }
public string LastName { get; set; }
public string Department { get; set; }
public string EmpID { get; set; }
}
[DataContract]
[KnownType(typeof(Employee))]
public class DynamicItemsContext
{
[DataMember]
public IEnumerable<Employee> employee { get; set; }
[DataMember]
public int totalCount { get; set; }
}
}