Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
359 views

I am trying to disable the button that causes post back and starts the file upload. This is to avoid user hitting the button twice and causing the file to be uploaded again.


<telerik:RadAsyncUpload 
                        RenderMode="Lightweight" runat="server" 
                        ID="RadAsyncUpload1" 
                        OnFileUploaded="serversideFileUploadedEvent"
                        OnClientFileSelected="OnFileSelected" 
                        OnClientFileUploadRemoving="OnFileUploadRemoving"
                        PostbackTriggers="uploadbutton" 
                        DropZones=".DropZone1"  
                        HideFileInput="true" />

<asp:Button CssClass="btn btn-primary" runat="server" ID="uploadbutton" Text="Upload" />    

 

I tried binding click event to the button for disabling the button on the client side but then the server side method does not fire.

Is there a way to disable the button or fire both client side and server side events?

Peter Milchev
Telerik team
 answered on 25 May 2021
0 answers
222 views

Workflow:

1) Client clicks on RadWizard Finish button
2) JavaScript code in either OnClientButtonClicking or OnClientButtonClicked performs some asynchronous background processing => file upload
3) RadWizard waits for JavaScript code to complete its operation (callback or something else – we are waiting in the OnClientButtonClicking or/and OnClientButtonClicked event handlers)
4) After successful operation RadWizard continues with the postback => OnFinishButtonClick server side event is called and data is saved in the database

Is it possible to achieve above-described workflow (or something similar) in the JavaScript and RadWizard ASP.NET AJAX control?

Michael
Top achievements
Rank 1
 asked on 25 May 2021
9 answers
1.7K+ views
First let me post the error I'm getting in logs:

RadAsyncUpload could not create App_Data folder. Ensure the App_Data's location is writable or set the TemporaryFolder property to a writable location.   at Telerik.Web.UI.RadAsyncUpload.CreateAppDataFolder()     at Telerik.Web.UI.RadAsyncUpload.EnsureDefaultTemporaryFolderExists()     at Telerik.Web.UI.RadAsyncUpload.OnPreRender(EventArgs e)     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at System.Web.UI.Control.PreRenderRecursiveInternal()     at ....

And here is something about my scenario. I have SharePoint application with some pages containing Telerik controls. Two of the pages contain RadAsyncUpload control. Everything is working fine except situation when I'm browsing two mentioned pages. I receive 403 forbidden error (above I posted what I found in logs). It's worth mentioning that I'm running web application with user account (local admin, not built-in account) as application pool identity and we have Form Based Authentication set up. Even if I try to access the page with administrator account it fails. I've tried to add write permission to app_data folder for app pool identity user but it didn't work. Any other clues what permissions should be set up?
Regards
Marek Witczak
Arijit
Top achievements
Rank 1
Iron
 answered on 25 May 2021
1 answer
761 views

Hi Team,

I am using Telerik - R32020.3.915 with .Net-4.8

Currently we are migrating Telerik.WebControls.RadGrid to Telerik.Web.UI.RadGrid, with help of below article.

https://www.telerik.com/support/kb/aspnet-ajax/grid/details/migration-from-radgrid-for-asp.net-(classic)-to-radgrid-for-asp.net-ajax.

My project has a skin="Sample" ,Exists in project skins folder.when I try to render with that ,no changes are seen.

Code Snippet:

     

<telerik:RadGrid ID="ItemRadGrid" AllowCustomPaging="true" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" 
              AutoGenerateColumns="False" GridLines="none"
              GroupingSettings-CaseSensitive="false" PageSize="50" Skin="Sample" 
              ShowGroupPanel="false" UseEmbeddedScripts="false" Width="100%" runat="server">
   

    <MasterTableView CommandItemDisplay="Top" DataKeyNames="Guid" Width="100%" AllowNaturalSort="false">

Error:

Telerik.Web.UI.RadGrid with ID='ItemRadGrid' was unable to find an embedded skin with the name 'Sample'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

Tried by removing and adding reference telerik.skins.dll ,but still issue exists,

if we try to set EnableEmbeddedSkins=false, no skin is rendered.

If there is property implemented for skins ?

Can anyone please help on this?

 

 

 

Rumen
Telerik team
 answered on 25 May 2021
1 answer
183 views

Hi there, 

I would like to know which is the easiest way to add a link button to a group Panel in a PvGrid.

It would be like in the image below.

Thanks,

Alvaro

Attila Antal
Telerik team
 answered on 25 May 2021
1 answer
421 views

Hi,

Im trying to bind a large data set with thousands of rows ,to a rad grid but I dont want to do it all at once,I want for example the pager to call lets say 15 rows at a time from the database and display those then the next page will call and display another 15....

Any help would be appreciated thanks.

 

Attila Antal
Telerik team
 answered on 25 May 2021
1 answer
572 views

*** Update from 17 Jan 2018 ***

The problem discussed below has been fixed in R1 2018 (2018.1.117).

*** End of update ***

The new Chrome 61 introduces some breaking changes which may lead to some of the following errors when the browser is scrolled and the resize handler of an appointment is clicked:

  • Uncaught TypeError: Cannot read property ‘viewPartIndex’ of null

  • Sys.WebForms.PageRequestManagerServerErrorException: Appointment Start time must be before the End time

  • Uncaught TypeError: Cannot read property 'cells' of undefined

  • Uncaught TypeError: Cannot read property 'resizeFromStart' of null

  • Uncaught TypeError: Cannot read property 'intervalIndex' of null;


Solution:

Placing the following JavaScript override before the declaration of the Scheduler should resolve all of the above issues:  

<script type="text/javascript">
    Telerik.Web.UI.RadScheduler.prototype._compensateScrollOffset = function(contentTable) {
        //In Chrome and Safari document.documentElement.scrollTop is always 0, due to a browser bug
        //In Internet Explorer there is no "document.scrollingElement"
        var scrollingElement;
        if ($telerik.isSafari || $telerik.isChrome) {
            scrollingElement = document.body.scrollTop <= document.scrollingElement.scrollTop ? document.scrollingElement : document.body;
        }
 
        var bodyOffsetElement = scrollingElement ? scrollingElement : document.documentElement,
        bodyScrollOffset = $telerik.getScrollOffset(bodyOffsetElement, false),
        scrollOffset = $telerik.getScrollOffset(contentTable, true);
 
        scrollOffset.x -= bodyScrollOffset.x;
        scrollOffset.y -= bodyScrollOffset.y;
 
        contentTable.targetRect.x += scrollOffset.x;
        contentTable.targetRect.y += scrollOffset.y;
 
        // The Safari issue here could be a problem in getLocation (used in getBounds). This code offsets it
        //if($telerik.isSafari3 || $telerik.isSafari4 || $telerik.isChrome)
        //{
        //    contentTable.targetRect.x += scrollOffset.x;
        //    contentTable.targetRect.y += scrollOffset.y;
        //}
    }
</script>


<telerik:RadScheduler runat="server" ID="RadScheduler1" ... >

If any other issues are observed in Chrome 61+ environment, please share them along with more details and specific examples of the reproduction steps so we can update the information here. 

For more information on the Google Chrome update and any issues with the position of ToolTips and ContextMenus, you may refer to http://www.telerik.com/forums/wrong-placement-of-radcontextmenu-in-chrome-61

Vessy
Telerik team
 answered on 25 May 2021
1 answer
292 views

Hello,
I am new to Telerik and I am currently supporting an ASP.NET application, I got a task in order to locate the files that were being uploaded by the application.
Reviewing the code I am making use of <telerik:RadAsyncUpload> using OnFileUploaded and InputStream.
I know that InputStream allows me to make the insert in database and process its content from the application. The doubt I have is where are the files that are uploaded using InputStream stored internally or where are they located, considering that it allows me to access the content of the uploaded files without saving them in a temporary location?

P.S.: I tried to check the App_Data\RadUploadTemp folder in my project but the files are not found.  

I would greatly appreciate your help, as I need to validate what documents are there and so on.

This is my code:

<telerik:RadAsyncUpload ID="RadAsyncUploadDocuments" runat="server" MaxFileSize="10485760" 
            MultipleFileSelection="Automatic" CssClass="multipleDocUpload" OnFileUploaded="RadAsyncUploadDocuments_FileUploaded" 
            Localization-Cancel="<%$Resources:cancel %>" Localization-Select="<%$Resources:select %>" Localization-Remove="<%$Resources:remove %>" >
        </telerik:RadAsyncUpload>

        <div class="doc_upload_buttons">
            <asp:Button runat="server" CssClass="action_button" ID="confirmUpload" OnClick="confirmUpload_Click" Text="<%$Resources:confirmUpload %>"/>
        </div>

 

protected void RadAsyncUploadDocuments_FileUploaded(object sender, Telerik.Web.UI.FileUploadedEventArgs e)
        {
            var Documents = Session["Documents"] == null ? new Bll.DocumentsCollection() : (DocumentsCollection)Session["Documents"];

            byte[] bytes = new byte[e.File.ContentLength];
            e.File.InputStream.Read(bytes, 0, (int)e.File.ContentLength);

            var document = new Bll.Documents();
            document._acprocessId = _acProcess.AcprocessId;
            document.AddedbyDate = DateTime.Now;
            document.AddedbyUsername = _user.UserName;
            document.AddedbyUsertype = (int)_user.ActiveReviewProcess.PermissionLevel;
            document.DocumentType = e.File.ContentType;
            document.AddedbyDate = DateTime.Now;
            document.Lastmodifieddate = DateTime.Now;            
            document.Path = e.File.GetName();
            document.Title = e.File.GetNameWithoutExtension();

            var documentId = document.Insert();
            document.DocumentId = documentId;
            var documentData = new Bll.DocumentData();
            documentData._documentId = documentId;
            documentData.BinaryData = bytes;
            documentData.Insert();

            Documents.Add(document);
            
            Session["Documents"] = Documents;
        }

        protected void confirmUpload_Click(object sender, EventArgs e)
        {
            UploadDocumentsSession _uploadDocumentsSession = new UploadDocumentsSession(_acProcess);
            _uploadDocumentsSession.Documents = Session["Documents"] as DocumentsCollection;
            _uploadDocumentsSession.CurrentDocument = _uploadDocumentsSession.Documents[0];
            _uploadDocumentsSession.UpdateSession();
            Response.Redirect(string.Format("~/{0}/DocumentManagerDashboard.aspx", _user.UserLevel >= SiteEnums.UserLevel.CCAReviewer ? "Admin/Processes" : "Public"));
        }
6 answers
295 views
Hi

I will work with 

<

 

ClientEvents OnRequestStart="gridRequestStart" />

But i get the Message "...is not a valid Attribut

i am working on Version

2009.3.1314.35

Regards
Markus

 

Sachita
Top achievements
Rank 1
Iron
Iron
Iron
 answered on 21 May 2021
7 answers
458 views
I am having a problem with RadGrid' scrolling position.

I want the header to be fixed. But they should move (scroll) horizontally, but not
vertically.

As it is a Telerik control I used their example (See below)

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Scrolling/DefaultCS.aspx

But it is helpless to me. The same thing I have applied, But when i fixed the header with the property  UseStaticHeader="True"  the headers are fixed.
I have also applied the container table property  style="table-layout:fixed".  After that they are not moving or scrolling horizontally nor vertically.

Please try to solve my problem, I am stuck.

You can see what problem I am facing. See the image below.



Please help. Its really urgent.
Sachita
Top achievements
Rank 1
Iron
Iron
Iron
 updated answer on 21 May 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?