Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
1.2K+ views
I am using RadAsyncUpload which is defined like this 

<telerik:RadAsyncUpload ID="FileUpload1" runat="server" Skin="Forest" Width="272px">
</telerik:RadAsyncUpload>

and i have a asp.net button defined like this 

<asp:Button ID="btnUpload" Width="180px"  Height="30px" runat="server" Text="Upload"
                           onclick="btnUpload_Click" />

Now it works and it uploads the file , but now i want to have a Progress Bar , so like other controls i did the following 

<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>

if i add this Ajax code , my Upload does not work , it give me the Following Error 
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

Thanks 

Scott Christopher Stauffer
Top achievements
Rank 2
 answered on 08 Feb 2017
0 answers
80 views
I am using a Telerik Upload control. I have increased the maxRequestLength and maxAllowedContentLength appropriately. I have set the executionTimeout to 600 seconds and temporarily disabled anti-virus. Small files (< 4MB) upload fine. Too large files (>32MB) are rejected by the server. But, files in between result in the IEnumerable<HttpPostedFileBase> argument being null. I can see the server creating the temporary files in the Temporary ASP.NET folder. The .post file is there and seems to have an appropriate planned size. But, when the timeout happens, it has not been completed and my code is called with a null. It seems odd coincidental that the break point is 4MB, but I cannot find any other configuration parameter controlling this. 
Mark
Top achievements
Rank 1
 asked on 08 Feb 2017
0 answers
70 views

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

Fit2Page
Top achievements
Rank 2
Bronze
Iron
Iron
 asked on 08 Feb 2017
4 answers
94 views

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.

Pavlina
Telerik team
 answered on 08 Feb 2017
8 answers
2.6K+ views

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.

Bouyez
Top achievements
Rank 1
 answered on 08 Feb 2017
1 answer
80 views

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?

Eyup
Telerik team
 answered on 08 Feb 2017
7 answers
1.0K+ views

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.

Nicolas
Top achievements
Rank 1
 answered on 07 Feb 2017
1 answer
92 views

The Rotator is displaying 4 buttons... Up, Down, Left, Right.
How can I hide, Up and Down?

Thanks.

JC

Juan
Top achievements
Rank 2
 answered on 07 Feb 2017
0 answers
111 views

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?


Thomas
Top achievements
Rank 1
 asked on 07 Feb 2017
0 answers
144 views

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; }

        }
    }

 

Nilesh
Top achievements
Rank 1
 asked on 07 Feb 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?