Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
105 views
hi dear
(I'm sorry for bad language)
I use  ribbon in my project.i want when user click on RibbonBarButton  after postback page same tab view before postback.
very tnx
Kate
Telerik team
 answered on 01 Feb 2012
1 answer
111 views
Hello all,

Is there an unique documentation file, except of "Appearance and Style" chapter of each control in the Telerik Help On line,  that presents how to use for each Telerik control their corresponding CSS?
Ie, for what each style is used in each control?

Example: RadTabStrip with the Skin Default
For what is used RadTabStripTop_Default and rtsOut, and so on?

Best regards,
Alain
Bozhidar
Telerik team
 answered on 01 Feb 2012
11 answers
501 views
Is it possible to add a link to the header of the scheduler (where it has the "today" link, date, and "Day", "Week", & "Month" buttons)?

If so, how?

Thanks.
Peter
Telerik team
 answered on 01 Feb 2012
1 answer
175 views

I have a RadWindowManager with RadWindow that opens a new window when a link within a RadGrid cell is clicked.  It opens the new window as a Modal="true".  In the new window's aspx page, it has a RadUpload, RadProgressArea and RadProgressManager, that uses TargetFolder="~/UploadFiles" and OverwriteExistingFiles="false".  What I would like is for it to check to see if the file exists already when the user submits the file.  If so, I want to present a javascript confirm() box to the user to ask if they want to overwrite the file.  If yes, then let it overwrite (and store the extra data in the database), if no, return back to the RadUpload popup window without saving the file (thus allowing them to cancel the process, rename the file on their hard drive and then re-upload).  I have tried using the submit button's click event handler to check for the file's existance, and if so, it calls a ClientScript.RegisterClientScriptBlock to register a confirm() box.  However, it doesn't seem to either fire or attach properly (or some other reason I can't figure out).  I've tried a number of different ways, but none are working.  The current version uses a hidden field to track if the file exists or not, but it's not working.  Any thoughts?
ASPX:

<script type="text/javascript">
        function CloseAndRebind() {
            GetRadWindow().BrowserWindow.refreshGrid();
            GetRadWindow().close();
        }
  
        function GetRadWindow() {
            var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
  
            return oWindow;
        }
  
        function CancelEdit() {
            GetRadWindow().close();
        }
  
        function ExecuteConfirm() {
            var returnValue = confirm('Warning: File exists.  Wanna overwrite?');
            if (returnValue) {
                document.getElementById('FileExistsHidden').value = "1";
                document.getElementById('SubmitButton').click();
            }
        }
  
        </script>
  
<telerik:RadUpload ID="FileRadUpload" runat="server"
        ControlObjectsVisibility="ClearButtons" InitialFileInputsCount="1" 
        MaxFileInputsCount="1" TargetFolder="~/UploadFiles"
        OverwriteExistingFiles="false" InputSize="45" Width="500px">
    </telerik:RadUpload>
    <telerik:RadProgressArea ID="RadProgressArea1" runat="server"
        DisplayCancelButton="true"
        ProgressIndicators="TotalProgressBar, TotalProgress, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed">
    </telerik:RadProgressArea>
    <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
        <hr />
        <asp:Button ID="SubmitButton" runat="server" Text="Submit" onclick="SubmitButton_Click" />
        <asp:HiddenField ID="FileExistsHidden" runat="server" />
aspx.cs:
protected void SubmitButton_Click(object sender, EventArgs e)
        {
            int customerDataId = MathHelper.ParseIntZeroIfNull(Request.QueryString.Get("cdid"));
            Type cstype = GetType();
            string warningScriptName = "PopupScript";
            string rebindScriptName = "RebindScript";
            ClientScriptManager cs = Page.ClientScript;
              
            if (FileRadUpload.UploadedFiles.Count > 0)
            {
                if (customerDataId > 0)
                {
                    Customers customers = new Customers();
                    foreach (UploadedFile file in FileRadUpload.UploadedFiles)
                    {
                        if (customers.CustomerFileExists(file.GetName()))
                        {
                            if (FileExistsHidden.Value != "1")
                            {
                                if (!cs.IsClientScriptBlockRegistered(SubmitButton.GetType(), warningScriptName))
                                {
                                    cs.RegisterClientScriptBlock(GetType(), SubmitButton.ID, "ExecuteConfirm();", true);
                                }
                            }
                            else
                            {
                                FileExistsHidden.Value = "";
                            }
  
                        }
                        else
                        {
                            customers.InsertCustomerFile(customerDataId, file.GetName(), Portal.GetIdsid);
                        }
                    }
                }
            }
  
            if (!cs.IsClientScriptBlockRegistered(GetType(), rebindScriptName))
            {
                cs.RegisterClientScriptBlock(cstype, rebindScriptName, "CloseAndRebind();", true);
            }
        }

Bozhidar
Telerik team
 answered on 01 Feb 2012
1 answer
160 views
This might help someone in future: 

I had a problem with a RadComboBox where I was binding to a datasource for the DataTextField and DataValueField, but checking the state of the RadComboBoxItems I noticed that the Value was consistently set to an empty string "". 

I couldn't come up with any answers until I discovered that in the control declaration in HTML I had mistyped DataValueField as DataValue. 

The string thing is that the Control doesn't check for invalid properties and raise and exception??

Regards,
Jacques
Ivana
Telerik team
 answered on 01 Feb 2012
0 answers
81 views
Hi there,
I've used demo code to get a list of the submitted check boxes from the tree view:

 private static void ShowCheckedNodes(RadTreeView treeView, Label label)
        {
            string message = string.Empty;
           
            IList<RadTreeNode> nodeCollection = treeView.CheckedNodes;
            foreach (RadTreeNode node in nodeCollection)
            {
                message += node.FullPath + "<br/>";
            }
            label.Text = message;
        }

This is all good, however it only shows the Text (Subject_Place ). Each node has an ID number field (SubjectID). Its this ID number I need, rather than the Text.
How can I get this instead of the Text?
Thanks,
Alan 


** UPDATE **
Seems like I've stumbled on the answer myself,  just needed to add:
message += node.Value + "<br/>";

Thanks.
Alan
Top achievements
Rank 1
 asked on 01 Feb 2012
5 answers
146 views
Hi,
I am getting following error in scheduler. 


Message: '0._preInitialized' is null or not an object
Line: 1144
Char: 1
Code: 0
URI: XXX/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2011.3.1115.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3acf16ab29-be3a-4761-9f9e-2c05ea68ff51%3a4c8be21a%3a650fdad%3aef9d9f4a%3aa51ee93e%3a59462f1%3a19620875%3a39040b5c%3af85f9819

This error is intermittent but frequent, I tried reproducing the error in a sample code, but the error is not reproducible there. Few things which might be helpful.
1. I am using the scheduler inside a usercontrol
2. This user control is loaded inside an updatepanel.
3. I am also using RadTooltipManager to show tooltips for appointment 
4. The user control has radajaxmanagerproxy which update the scheduler and tooltipmanager
5. This error usually comes when I try to navigate between views.

  The axd script which throws error is 

b.RadScheduler._preInitialize=function(p,o,m,k,l){var n=d("#"+p);
if(n[0]._preInitialized&&!$telerik.isIE){return;
}
Please let me know if this is a known issue or at least what this script is trying to do
Peter
Telerik team
 answered on 01 Feb 2012
1 answer
75 views
I am evaluating the controls and so far I absolutely love them!

I am not sure how to explain it so i will just show you.

Go to http://www.iytworldwide.com

From the top menu select | Master Files | Courses

Move your mouse over any of the text in the Description column (make sure you are over text) Double click the row (again make sure you are over text). A rad window should popup. Just click Save or Cancel. Note that ALL the text in all the rows grid become selected.

If you double click in an area where there is no text its fine.

How can I stop this?

Thanks.

Marin
Telerik team
 answered on 01 Feb 2012
2 answers
371 views
Installed "RadControls for ASP.NET AJAX" yesterday.

Went sort of smoothly.
Started on RadControlsAJAXCourseware Chapter 2 Navigation.
Got that to work OK i.e. Set the Skin property to "WebBlue". worked OK

So started a new project this morning.
When I drag a docklayout I get a popup about "A file name with 'Bin/Telerik.Web,UI.dll already exists. Do you want to replace.
Tried both Yes and No. Allows me to continue.

Then tried to select a skin and get an error about "no skin assmebly found"
The Solution Explore show in bin
Telerik.Web.UI.dll
Telerik.Web.UI.Skins.dll
Telerik.Web.UI.xml
Tried a complete deinstall and reinstall of Telerik AJAX , didn;t solve it.

I am sure that I could select skins yesterday.

Any ideas, have a trashed something ???
Jim

Rumen
Telerik team
 answered on 01 Feb 2012
2 answers
97 views
Hi
please consider this simple UserControl :
ASCX :
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WebUserControl.ascx.cs" Inherits="WebUserControl" %>
<telerik:RadUpload ID="up" runat="server"></telerik:RadUpload>
<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" />

C# :
    protected void Button1_Click(object sender, EventArgs e)
    {
        int c = up.UploadedFiles.Count;
        int i = up.InvalidFiles.Count;
    }
I always get 0 for both UploadedFiles , and InvalidFiles 
it seems this problem is in UserControls !!
have I done anything wrong
if no , can I fix the problem

Thank you for your feedback
reza
Top achievements
Rank 1
 answered on 01 Feb 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?