Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
220 views
Hi,
I have a RadNumericTextBox within an <asp:PlaceHolder>

On page load the <asp:PlaceHolder is not visible. After a series of drop downs within another <asp:PlaceHolder the last drop down set the visibility of the place holder that contains my RadNumericTextBox to true.

this is my RadAjaxManager
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="PhChoice">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="PhWithTb" />
            </UpdatedControls>
        </telerik:AjaxSetting>

When I run this the PnWithTb shows but the validation on the RadNumericTextBox does not work. If I set EnableAjax=False on the RadAjaxManager to false it works fine. 

Can any one suggest what I'm doing wrong?

Thanks
Vasil
Telerik team
 answered on 04 Oct 2011
1 answer
478 views
Hi,

I am using a file explorer control. under the open event of the right click menu I am forcing the files to be downloaded. The Download works fine for small files. But When I download a file which is around 300mb in size I get an error. There is no error code. I get the Internet explorer error message saying the page cannot be displayed.

I assume that it might be a time out issue.

Can someone help me overcome this issue.

Thanks 

My code is as follow
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

in .aspx page 

<script type="text/javascript" >

    function OnClientFileOpen(sender, args) 
        {
            if (!args.get_item().isDirectory()) 
            {
                var href = args.get_item().get_path();
                window.location.href = href;
                args.set_cancel(true);
var item = args.get_item();
                var requestfile = "Handler.ashx?path=" + item.get_url();
                document.location = requestfile;
               
            }
        }
</script>

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Handler.ashx


<%@ WebHandler Language="C#" Class="Telerik.Web.Examples.FileExplorer.FilterAndDownloadFiles.Handler" %>

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Text;
using Telerik.Web.UI;


namespace Telerik.Web.Examples.FileExplorer.FilterAndDownloadFiles
{
    [RadCompressionSettings(HttpCompression = CompressionType.None)] // Disable RadCompression for this page ;
    public class Handler : IHttpHandler
    {
        #region IHttpHandler Members


        private HttpContext _context;
        private HttpContext Context
        {
            get
            {
                return _context;
            }
            set
            {
                _context = value;
            }
        }




        public void ProcessRequest(HttpContext context)
        {
            Context = context;
            string filePath = context.Request.QueryString["path"];
            filePath = context.Server.MapPath(filePath);


            if (filePath == null)
            {
                return;
            }


            System.IO.StreamReader streamReader = new System.IO.StreamReader(filePath);
            System.IO.BinaryReader br = new System.IO.BinaryReader(streamReader.BaseStream);


            byte[] bytes = new byte[streamReader.BaseStream.Length];


            br.Read(bytes, 0, (int)streamReader.BaseStream.Length);


            if (bytes == null)
            {
                return;
            }


            streamReader.Close();
            br.Close();
            string extension = System.IO.Path.GetExtension(filePath);
            string fileName = System.IO.Path.GetFileName(filePath);
            //context.Response.TransmitFile(fileName);
            WriteFile(bytes, fileName, "application/octet-stream", Context.Response);
        }


        /// <summary>
        /// Sends a byte array to the client
        /// </summary>
        /// <param name="content">binary file content</param>
        /// <param name="fileName">the filename to be sent to the client</param>
        /// <param name="contentType">the file content type</param>
        private void WriteFile(byte[] content, string fileName, string contentType, HttpResponse response)
        {
            response.Buffer = true;
            response.Clear();
            response.ContentType = contentType;


            response.AddHeader("content-disposition", "attachment; filename=" + fileName);


            response.BinaryWrite(content);
            response.Flush();
            response.End();
        }


        public bool IsReusable
        {
            get
            {
                return false;
            }
        }


        #endregion
    }
}


///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Web.config

    <httpRuntime executionTimeout="1200" maxRequestLength="1048576" requestLengthDiskThreshold="80" 
                 useFullyQualifiedRedirectUrl="false" minFreeThreads="8" minLocalRequestFreeThreads="4" 
                 appRequestQueueLimit="5000" enableKernelOutputCache="true" enableVersionHeader="true" 
                 requireRootedSaveAsPath="true" enable="true" shutdownTimeout="90" delayNotificationTimeout="5"
                 waitChangeNotification="0" maxWaitChangeNotification="0" enableHeaderChecking="true" 
                 sendCacheControlHeader="true" apartmentThreading="false"/>

        
Mevlish
Top achievements
Rank 2
 answered on 04 Oct 2011
1 answer
109 views
Hi,

One of my client is facing issue with RadGrid export to excel functionality. Issue is - it is not exporting all the records. Strangely it is missing some records in between. It is working fine in my environment which is Office 2010. 

My client environement is -
Excel 2003 SP3
IE8
XP Professional  Version 2002 SP3

Appreciate your help!

Code:

            radExportGrid.MasterTableView.ShowHeader = false;

            radExportGrid.ExportSettings.HideStructureColumns = true;

            radExportGrid.ExportSettings.IgnorePaging = true;

            radExportGrid.ExportSettings.FileName = "IdeaExcelExport";

            radExportGrid.ExportSettings.OpenInNewWindow = true;

            radExportGrid.MasterTableView.ExportToExcel();

Daniel
Telerik team
 answered on 04 Oct 2011
2 answers
116 views
Hi

I want to modify the AdvancedEditTemplate and the AdvancedInsertTemplate, I basically understand how it works but I would like to start with the exact html (with all the class names ect) of the custom templates (built in ones)  is the a place where I can get this.

Thanks
Plamen
Telerik team
 answered on 04 Oct 2011
2 answers
112 views
Im using progress area with raduploader . The problem is that when i first select the image and click on upload button image get uploaded and the progress bar also seems to work properly but for the second time progress bar does not appear however image gets uploaded . I  Found that there is a string (RadUrid=70bd36e7-2bdd-44c7-afb7-e9563a7ce164) which gets append in the querystring .
I got stuck in this and spent a lot of time to debug this . Kindly suggest as soon as possible .

Thanks
Peter Filipov
Telerik team
 answered on 04 Oct 2011
2 answers
119 views
Hmm.......When click "Dismiss" button, exactly what should I do to database table?
Should I need to update "Reminder" column to NULL? (I did see telerik API for my database table structure)

Hee.
Hee
Top achievements
Rank 1
 answered on 04 Oct 2011
1 answer
68 views
Browser: Internet Explorer 8
Visual Studio Builder: 7/18/2011

Hello all,

During the creation of styles for RadMenu control, the Visual Studio Builder didn't display correctly the information of menu items when we clicked on them.

Example: we created styles for item "Hovered root item", with Yellow  back color and save it, clicked after to item "Hovered" and created styles with Violel back color and save it. It was ok, but when we clicked again on "Hovered root item", Visual Studio Builder didn't show the right information of associated styles, back color staying with Violet and not Yellow.

See the annexed image.

Maybe we don't use the tool correctly.

Please advice, thank you,
Alain

Ivan Zhekov
Telerik team
 answered on 04 Oct 2011
1 answer
134 views
Alot of the examples, like the link below, are using this line:
Imports LinqToSQL
which is not valid for me.

I am using visual studio 2010. Not sure where the problem might be. Any help would be appreciated.

http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultvb.aspx

Thanks,
Justin
Radoslav
Telerik team
 answered on 04 Oct 2011
1 answer
165 views

If I have 2 applications setting to the same TemporaryFolder but 1 TemporaryFileExpiration is set to 3 hours the other is set to 5 hours. 


Would files uploaded from app1 stay for 3 hours and files uploaded from app2 stay for 5 hours?
Or is it going to delete the files in the folder based on system clock for the shortest TemporaryFileExpiration configured??
Dimitar Terziev
Telerik team
 answered on 04 Oct 2011
1 answer
422 views
I have a NestedViewTemplate which is based on the demo. Unfortunately it cannot find the Panel within it. What's going on with it?

<telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True"
    AllowSorting="True" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
    GridLines="None" OnItemCommand="RadGrid1_ItemCommand" OnUpdateCommand="RadGrid1_UpdateCommand1"
    OnItemCreated="RadGrid1_ItemCreated">
    <MasterTableView DataSourceID="SqlDataSource1" Name="Client" CommandItemDisplay="Top"
        DataKeyNames="account_id,contact_id1,user_id">
        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <DetailTables>
            <telerik:GridTableView DataKeyNames="user_id" runat="server" CommandItemDisplay="Top"
                CommandItemSettings-AddNewRecordText="Add New Accommodation" Caption="Accommodation"
                DataSourceID="SqlDataSource4" Width="100%" AutoGenerateColumns="false" AllowAutomaticDeletes="True"
                AllowAutomaticInserts="True" Name="Accommodation">
                <NestedViewTemplate>
                    <asp:Panel runat="server" ID="InnerContainer" Visible="false">
                        <telerik:RadTabStrip runat="server" ID="AccommodationTabStrip" MultiPageID="MultiPage1"
                            SelectedIndex="1">
                            <Tabs>
                                <telerik:RadTab runat="server" Text="Alternative Contacts" PageViewID="PageView1">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Features/Facilities" PageViewID="PageView2"
                                    Selected="True">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Gallery" PageViewID="PageView3">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" PageViewID="PageView5" Text="Bookings">
                                </telerik:RadTab>
                                <telerik:RadTab runat="server" Text="Statistics" PageViewID="PageView4">
                                </telerik:RadTab>
                            </Tabs>
                        </telerik:RadTabStrip>
                        <telerik:RadMultiPage runat="server" ID="MultiPage1" SelectedIndex="0" RenderSelectedPageOnly="false"
                            Width="656px">
                            <telerik:RadPageView runat="server" ID="PageView1">
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("user_id") %>'></asp:Label>
                                <telerik:RadGrid runat="server" ID="AccommContactsGrid" DataSourceID="SqlDataSource6"
                                    ShowFooter="True" AllowSorting="True" EnableLinqExpressions="False" AllowAutomaticDeletes="True"
                                    AllowAutomaticInserts="True" AllowAutomaticUpdates="True" AllowFilteringByColumn="True"
                                    AllowPaging="True" AutoGenerateColumns="False" GridLines="None">
                                    <MasterTableView ShowHeader="true" DataKeyNames="accom_id" PageSize="7" CommandItemDisplay="Top">
                                        <CommandItemSettings ExportToPdfText="Export to Pdf" />
                                        <CommandItemTemplate>
                                            <div style="padding: 5px 5px;">
                                                <asp:LinkButton ID="btnInsertAccom" CommandName="InitInsert" OnClientClick="return ShowInsertForm();"
                                                    runat="server"><img style="border: 0px; vertical-align:middle;" src="Images/03.png" />Add New Client Account</asp:LinkButton>
                                                <asp:LinkButton ID="btnOptionsAccom" CommandName="Options" runat="server" OnClientClick="return ShowOptionsForm();"><img style="border: 0px; vertical-align:middle;" src="Images/09.png" />Options</asp:LinkButton>
                                                <asp:LinkButton ID="btnRefreshAccom" CommandName="RebindGrid" runat="server"><img style="border: 0px; vertical-align:middle;" src="Images/21.png" />Refresh Link Group List</asp:LinkButton>
                                            </div>
                                        </CommandItemTemplate>
                                        <Columns>

And so forth ...

Here's the codenehind.

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridNestedViewItem)
    {
        Panel panel = (Panel)e.Item.FindControl("InnerContainer");
        if (panel != null)
        {
            panel.Visible = ((GridNestedViewItem)e.Item).ParentItem.Expanded;
        }
    }
}

The panel != null is there to obviously avoid failure but TBH it's pointless using the NestedViewTemplate if the codebehind isn't going to pick up the embedded control. It happens elsewhere in the code as well.
Princy
Top achievements
Rank 2
 answered on 04 Oct 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?