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

Hi guys,

I've been attempting to create and aspx page that will automatically launch the select window, as if the user had clicked the "Browse" button, as soon as the page loads.  I was able to launch the window successfully using a new button I created myself (ID "RunMe"), and as you can see I've tried a couple different methods in the code below to try and launch the window on page load (document.ready and an onload function call in the body tag).  I added in the timeouts in case the call was happening before the control finished loading.  I'm testing in Chrome Version 48.0.2564.97 m.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NewFileUpload.aspx.cs" Inherits="CYBERWebPortal.NewFileUpload" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<script type="text/javascript">
        function OnClientFileUploaded(sender, args) {
            //var contentType = args.get_fileInfo().contentType;
            //alert(contentType); 
            
            __doPostBack('RadAsyncUpload1', '');
           
        }
        function OnClientClicking(sender) {
            setTimeout(function () {
                $telerik.$(".ruFileInput").click();
            }, 100);
            //$telerik.$(".ruFileInput").click();
        }
        function FinishedLoading(sender) {
            setTimeout(function () {
                $telerik.$(".ruFileInput").click();
            }, 900);
            //$telerik.$(".ruFileInput").click();
        }

        $(document).ready(function () {
            setTimeout(function () {
                document.getElementById("RunMe").click();
            }, 900);
        });

    </script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body onload="FinishedLoading()">
    <div>
        <button type="button" id="RunMe" onclick="OnClientClicking()">Test</button>
        <p><strong> Your test was successful. You have reached doc upload!</strong></p>
        
            
            <div style="display:inline-block;" > 
                <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>
                
        <telerik:RadAsyncUpload ID="RadAsyncUpload1" 
                runat="server"
                AutoAddFileInputs="false"
                OnFileUploaded="HandleFileUploaded" 
                OnLoad="HandlePageLoadForFiles" 
                OnClientFileUploaded="OnClientFileUploaded" 
                Localization-Select="Upload"  InputSize="25" 
                AllowedFileExtensions=".jpg,.jpeg,.pdf,.doc,.docx,.bmp,.tif,.tiff,.png,.txt,.ppt,.pptx,.xls,.xlsx,.rtf"
                TemporaryFolder="../App_Data/"
                TargetFolder="../TargetUploads/" 
                EnablePermissionsCheck="false"
                EnableInlineProgress="false" > 
        </telerik:RadAsyncUpload>
        
</div>
        
</div>

</body>
</html>

Ivan Danchev
Telerik team
 answered on 08 Feb 2016
2 answers
62 views

I have a form contains many types of controls and validationpart .contains a rad tabstrip has two tabs in one tab entry controls like radtextbox and radcombobx there is a vaidation for each control result in a validationsummary, second tab contains a radgrid containing add record button opens a radwindow cotaining a webform for enering data .

In normar case when pressing a tab from tab strib it cuases a postback so the validation summary has error messages but the add button in the radgrid works fine.

I edited the config file add

<add key="validationsettings:unobtrusivevalidationmode" value="none">

 

the tabstrip worked fine but the add button in the radgrid has no effect and the window.radopen does not occure

is there a setting do the same thing witout affecting radgrid or radwindow

 

 

Ivan Danchev
Telerik team
 answered on 08 Feb 2016
7 answers
197 views
Is it possible to collapse a node when one of the nodes below are clicked?  I have a navigation control with multiple nodes with some nodes having "sub" nodes.  When one of the sub nodes are clicked the page does what I want (navigate a separate panel to a new page) but the node stays expanded unless another parent node is clicked on the navigation control itself is clicked.
Thanks,
Jeff
Jon
Top achievements
Rank 1
 answered on 08 Feb 2016
3 answers
169 views
I have drilldown enabled on my Org Chart, but I want to load the page "already drilled down" to a specific Node ID

I'll know the Node ID when the page loads

So is this possible, and if so, how?

Thanks
Peter Filipov
Telerik team
 answered on 08 Feb 2016
2 answers
78 views

I've made a lot of progress with the scheduler, but I am running into one issue.

I am working on scheduling physicians and they are either scheduled as a person or a group.

I have two seperate drop down boxes.  One for physicians and one for groups.

 I am able to display the appointment and return either the group name or physician name on the appointment box, but I have set a parameter for inserting or updating entries with a @Type parameter.  @Type is defined in my c# code and works for all other function, except when dragging an appointment to another day.  @Type sets whether the insertion was a physician or a group.  When I do a report it will need to know if the ID stored is a physician ID or group ID.  Based on that it will resolve group/physician names and create links.

 

Long story short I need to be able to define @Type insert parameter while the appointment is being moved to another day.  The appointment wouldn't necessarily be the last appointment open, which is making it harder.  The javascripting I've tried so far with OnClientAppointmentMoveEnd has caused the appointment to not be stored in SQL at all.

Daniel
Top achievements
Rank 1
 answered on 07 Feb 2016
16 answers
1.4K+ views
I'm modifying one of our older ASP.NET WebForms apps that I've used Telerik AJAX controls in. While running the app in the VS 2010 debugger, I've started to get this error message:

"JavaScript runtime error: Unable to get property 'documentElement' of undefined or null reference"

It stops in Telerik.Web.UI.WebResource_4.axd code when I click on the RadDatePicker control. I've not modified that page in a very long time. If anything I've upgraded the Telerik ASP.NET AJAX controls, or at least I've downloaded them and installed them on my PC. If I run VS 2010 without the debugger and then click on the RadDatePicker control, I'll get a popup dialog box asking me if I want to use IE10's built in JavaScript debugger, because the same line is hit on. That line is:

var E = a.document.documentElement;


Which is in the getLocation: function (a)
(at least that's where I found it. That line of code maybe elsewhere.)

Bottom line: What's wrong and what can I do about it?

raghwendra
Top achievements
Rank 1
 answered on 06 Feb 2016
3 answers
269 views

Hi,

When the colorpicker is located at the bottom of a page, it always cuts off the tabs at the bottom.

Se attached image from your demo!

http://demos.telerik.com/aspnet-ajax/colorpicker/examples/overview/defaultcs.aspx

Set "With a picker button" in the demo!

Regard
Andreas

Slav
Telerik team
 answered on 05 Feb 2016
1 answer
57 views
Hello Telerik, Im trying to solve a problem that i faced with radwindow, Ihave one Parent Page, on some event it opens a radwindow A(For Example), on A, there's another event that opens another radwindow (B), when i shoot the event on (A) i got the (B) rad window within A, how can i show (B) over (A) borders
Marin Bratanov
Telerik team
 answered on 05 Feb 2016
2 answers
199 views

Hi,

I am trying to load a radcombobox filter as below,  the sqldatasource where conditions are coming from session values - session("ssnUSER_NAME") and session("ssnUSER_ID"). //VB.net 4.5/2015Q2/Oracle

The radcombo filter is not getting populated.

What am I missing?

Also a secondary question, I want to display user name but the filter should pickup user_id="some_id". Is it possible?

Any help will be greatly apprerciated. Thanks.

<telerik:GridBoundColumn DataField="USER_NAME" HeaderText="CREATED BY"

SortExpression="USER_NAME" UniqueName="USER_NAME" ReadOnly="true">

<FilterTemplate>

<telerik:RadComboBox RenderMode="Lightweight" ID="rcbUserName" DataSourceID="SqlDataSource5" DataTextField="USER_NAME"

DataValueField="USER_NAME" Height="200px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container, GridItem).OwnerTableView.GetColumn("USER_NAME").CurrentFilterValue %>'

runat="server" OnClientSelectedIndexChanged="UserNameIndexChanged">

<Items>

<telerik:RadComboBoxItem Text="All" />

</Items>

</telerik:RadComboBox>

<telerik:RadScriptBlock ID="RadScriptBlock4" runat="server">

<script type="text/javascript">

function UserNameIndexChanged(sender, args) {

var tableView = $find("<%# TryCast(Container, GridItem).OwnerTableView.ClientID %>");

tableView.filter("USER_NAME", args.get_item().get_value(), "EqualTo");

 

}

</script>

</telerik:RadScriptBlock>

</FilterTemplate>

</telerik:GridBoundColumn>

 

 

<asp:SqlDataSource ID="SqlDataSource5" runat="server" ConnectionString="<%$ ConnectionStrings:ApplicationServicesOracle %>"

ProviderName="<%$ ConnectionStrings:ApplicationServicesOracle.ProviderName %>"

SelectCommand="select distinct b.USER_NAME, b.USER_ID from tblPTS a join tblUSER_DETAILS b on a.USER_ID = b.USER_ID where (b.TEAMLEAD = :ssnUSER_NAME or a.USER_ID = :ssnUSER_ID) and (a.STATUS = 'RECEIVED' or a.STATUS = 'IN PROGRESS')">

<SelectParameters>

<asp:SessionParameter Name="ssnUSER_NAME" SessionField="ssnUSER_NAME" />

<asp:SessionParameter Name="ssnUSER_ID" SessionField="ssnUSER_ID" />

</SelectParameters>

</asp:SqlDataSource>

 

 

 

Subhashini
Top achievements
Rank 1
 answered on 05 Feb 2016
3 answers
247 views
I'm just posting a solution an error I was getting in Visual Studio 2010 as I couldn't seem to find a solution in the Telerik forums when searching. Forgive me if it's already posted.

When in Design mode all of my telerik controls on the page were showing the error "Error Creating Control - <ControlName> Object reference not set to an instance of an object"

I googled this error and found the 'workaround' solution at this link here.

You basically have to go to the OnInit event of your page (or of the class your page is inheriting from) and surround your init code with a check to see if it's not in DesignMode. Once you have surrounded your code with this check, you must close your pages and rebuild the project to make it work.

here's the code example:

protected override void OnInit(EventArgs e)
{
    if (!this.DesignMode)
    {
        //code here
    }
}

This is a bug with Visual Studio 2010 and not Telerik.

Hope this helps someone.
Kellie
Yudhishter
Top achievements
Rank 1
 answered on 05 Feb 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?