Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
450 views

Hi

So I have RadListBox implemented into my page and I need to add some additional on keyDown functionality

I attached on OnClientLoad a keydown event to the .rlbGroup class - it is getting into the function and doing the stuff that I am telling it to however there are some issues:

1. I am unable to remove the .rlbActive class from previously selected item

so RadListBox.get_items().get_item(0).removeClass('.rlbActive') is not an option 

I tried using _activateItem() since I believe it is deactivating the current rlbActive in itself without success also. The DOM does not give me idea how to properly get rid of the active class at all.

Some assistance would be appreciated. It is an option to disable the rlbActive class completely - How can I do that without risking creating a bug in the control?

Self answered: 2. on clicking on the control I am unable to fire my the keydown function (I can fire it if I move focus to the control via TAB key)
What is the proper way to set focus on the RadListBox.get_items()?
What I have tried so far is using event 'focusing' in OnClientLoad attaching to .rlbGroup 
 

Any idea or even general information is welcome

Thanks

 

rhin
Top achievements
Rank 1
Iron
 answered on 26 May 2021
2 answers
428 views
I have an ASP.NET webforms application which has been in production for a while that uses a hierarchical menu structure to allow the user to select the business "level" they wish to operate on (Area, District, and Territory). Most people have used their desktops to access this application.

The menu is set up to allow people to click on the "area", or "district", or "territory" they wish to operate on. For example, they can click on the area to select the entire area, or they can hover over the area (on their laptop) to 'drill down' to the district level, and then click on a district, or hover over a district to then drill down to the territory level within the district to click on and select a territory.

A client side click event is present to process the selection.

The problem I am experiencing is on mobile devices one cannot "hover" over the menu item to 'drill down'. It is necessary to "click" on a menu item to drill down. However, when you click on the item, even if it is the little arrow on the right-hand side, the click event kicks off and you end up selecting a whole area (it is impossible to drill down further than the area level, since any time you "click" on the little arrow to attempt to drill down to the district level, the click event fires off and selects the area.

Can someone provide some guidance as to how to replicate the functionality I see on a laptop on a mobile device? Everything works great on a laptop or PC, because you can 'hover' with your mouse over the area/district menu options and you get the correct sub-menu fly-out to the right... but there's no such hover capability I'm aware of on an ios or android device.

Thanks!
ToltingColtAcres
Top achievements
Rank 2
Veteran
Iron
 answered on 25 May 2021
1 answer
409 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
252 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.8K+ 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
867 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
212 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
484 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
638 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
344 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"));
        }
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?