Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
88 views
OK, I just inherited a project that uses these controls and I am not sure how to word this.  I have a page thatuse radtabstrip and multipage. I have several pages and when I click on to save, the tables are getting updated with all the values with the first tab and doesn't see anything else.  I also get the identity of the record and save it as a session variable for a child table and it doesn't see it either. Is it possible for me to see the controls on all the tabs? If so, how do I do it?
Genady Sergeev
Telerik team
 answered on 01 Dec 2011
5 answers
373 views
I have a RadDateTimePicker that needs to stay empty when the page loads. When the user selects a time from the TimePopupButton, the Date & Time are populated in the RadDateTimePicker.  The problem is the date portion that's populated is always today's date. How can I default this to another date, for example DateTime.Now.AddDays(1)?

If I set the "SelectedDate" property to DateTime.Now.AddDays(1), then the date that's populated works as expected. But setting "SelectedDate" causes the RadDateTimePicker to display this date when the page loads. I need it to be empty on page load and only populated if the user selects something from the PopUpButtons. 
Kevin
Top achievements
Rank 2
 answered on 01 Dec 2011
7 answers
283 views
Hello,

I'm trying to set a customvalidator for the RadUpload control in order to check the maximum upload size, but I got an error (Attached screen-shot). My code is based on http://sample.topscms.com/blog/post/1607--client-side-file-size-validation-for-telerik-upload.

Default2.aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
       <asp:ScriptManager ID="asdasD" runat="server">
       </asp:ScriptManager>
 
       <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                var currentLoadingPanel = null;
                var currentUpdatedControl = null;
 
                function RequestStart(sender, args) {
                    currentLoadingPanel = $find("<%= TasksRadAjaxLoadingPanel.ClientID %>");
 
                    if (args.get_eventTarget() == "<%= SubmitButton.UniqueID %>") {
                        args.set_enableAjax(false);
                    }
 
                    currentUpdatedControl = "<%= MainPanel.ClientID %>";
 
                    //show the loading panel over the updated control
                    currentLoadingPanel.show(currentUpdatedControl);
                }
 
                function ResponseEnd() {
                    //hide the loading panel and clean up the global variables
                    if (currentLoadingPanel != null)
                        currentLoadingPanel.hide(currentUpdatedControl);
                    currentUpdatedControl = null;
                    currentLoadingPanel = null;
                }
 
                function validateRadUploadFileSize(source, arguments) {
                    var totalFileSize = 0;
                    var maxFileSize = 100000;
                    var radUpload = $find('<%= AttachedFilesRadUpload.ClientID %>');
                    var fileInputs = radUpload.getFileInputs();
                    for (var i in fileInputs) {
                        if (fileInputs[i] && fileInputs[i].files[0]) {
                            totalFileSize += fileInputs[i].files[0].fileSize;
                        }
                    }
 
                    arguments.IsValid = totalFileSize <= maxFileSize;
 
                }
            </script>
        </telerik:RadCodeBlock>
 
 
       <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="SubmitButton">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="MainPanel" LoadingPanelID="TasksRadAjaxLoadingPanel" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
            <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
        </telerik:RadAjaxManager>
 
        <telerik:RadAjaxLoadingPanel ID="TasksRadAjaxLoadingPanel" Skin="Vista" runat="server">
        </telerik:RadAjaxLoadingPanel>
 
        <asp:Panel ID="MainPanel" Width="100%" HorizontalAlign="Left" runat="server">
 
            <telerik:RadProgressManager ID="Radprogressmanager1" Width="403px" runat="server" />
            <telerik:RadUpload ID="AttachedFilesRadUpload" InitialFileInputsCount="1" MaxFileInputsCount="10" ControlObjectsVisibility="AddButton, RemoveButtons, CheckBoxes"
                       Width="405px" runat="server" />                       
            <telerik:RadProgressArea runat="server" Width="405px" ID="ProgressArea1" ></telerik:RadProgressArea>
 
             <asp:CustomValidator runat="server" ID="CustomValidator1" Display="Dynamic" ClientValidationFunction="validateRadUploadFileSize"
                        OnServerValidate="CustomValidator1_ServerValidate" ValidationGroup="CreateNewTaskValidationGroup">       
                        The maximum upload size is 100 KB
             </asp:CustomValidator>
 
             <asp:Button runat="server" ID="SubmitButton" ValidationGroup="CreateNewTaskValidationGroup" Text="Submit" />
 
         </asp:Panel>
 
    </div>
    </form>
</body>
</html>

Default2.aspx.cs:

using System;
using System.Web.UI.WebControls;
public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void CustomValidator1_ServerValidate(object source, ServerValidateEventArgs args)
{
args.IsValid = (AttachedFilesRadUpload.InvalidFiles.Count == 0);
}
}

Please, I need you help in order to solve this problem.
It is very appreciated to send me the modified code.

Regards,
Bader
Kevin
Top achievements
Rank 2
 answered on 01 Dec 2011
1 answer
540 views
We have found a Xss vulnerability in the Telerik.Web.UI.WebResource.axd [_TSM_CombinedScripts_ parameter], where it is possible to edit the javascript. We are currently using an older version of the library (2009.3.1103.20). Can anyone confirm that this issue is fixed in the latest release, and in what version was this issue solved?
Simon
Telerik team
 answered on 01 Dec 2011
7 answers
211 views
I'm not even sure this can be done, but here goes:

What I am trying to do is avoid database hits on every character entered in a Load-On-Demand RadComboBox.  When one character is entered, I go to the database and get the resulting dataset.  Any further characters entered will filter that same dataset.  The only time the database is accessed is when the first character is entered.  Is this even possible? If so, any pointers?
Ivana
Telerik team
 answered on 01 Dec 2011
4 answers
221 views
Hi Everone

Can some one tell me why i get this error
Microsoft JScript runtime error: Object doesn't support property or method 'get_items'

when i execute the following js code
var listbox = document.getElementById("<%=rlbCustomEmails.ClientID %>");
var item = new Telerik.Web.UI.RadListBoxItem();
item.set_text(email);
listbox.get_items().add(item); //I get the error here

it is searching for this control
<telerik:radlistbox runat="server" style="position: absolute; top: 290px; left: 400px;"
        height="240px" width="255px" ID="rlbCustomEmails"></telerik:radlistbox>

KobusVisagie
Top achievements
Rank 1
 answered on 01 Dec 2011
1 answer
77 views
Hi,

The look of grouping (in the data area of a grid) consists of three elements:
  • the group header
  • the cell to the left of the group header, containing icons for expanding / collapsing; let's name it "the control cell"
  • cells the the left of data rows; let's name them "filling cells"

I'm using the Simple skin and Q1 2010 version of the controls.
All these elements have initially the same, darkgray background. The control cell (and its column) is quite wide. I would like to change two aspects of their look:

  • the back color of all of them
  • the width of the control cell and the filling cells

I tried to use GroupHeaderItemStyle. Changing its BackColor changed the back color of the header and the filling cells - but the control cell remained untouched. Changing its Width changed nothing.
I tried to modify Grid.Simple.css file. I've succeeded in changing the back color of all the required elements. But I cannot make the column with the control and filling cells narrower. The MasterTableView is rendered with the "colgroup" element wich contains 20px width of this column. This is the key - is it possible to me to change this value?

Regards
Tomasz

Mira
Telerik team
 answered on 01 Dec 2011
2 answers
164 views
Hello.

I have a Grid with an EditMode="Popup". I would like to display a gif image (an animated wheel or anything else) while the popup window is loading (this takes around 1 or 2 seconds).

How can I do this?

Thanks for you help
Regards
Augusto
Augusto
Top achievements
Rank 1
 answered on 01 Dec 2011
2 answers
143 views
Dear all,
I want to write a javascript function  to check a List using CheckBOX in RADGRID below:

If there is no item is checked=> return false;
If there is one or more item(s) is checked=> return true;

Please help me to do it
Thanks alot,
Ky
Top achievements
Rank 1
 answered on 01 Dec 2011
5 answers
360 views
Hello ,

am using  RadAsyncUpload .
below is my code

 

//To validate upload control.
       function validationFailed(sender, eventArgs) {
           $telerik.$(".ErrorHolder").html("");
           $(".ErrorHolder").append("<p>Attachment exceeding the maximum total size for the file '" + eventArgs.get_fileName() + "'.</p>").fadeIn("slow");
       }
       //Remove Error Message.
       function RemoveErrorMessage(sender, eventArgs) {
           $(".ErrorHolder").fadeOut("slow");
       }

 


 

<telerik:RadAsyncUpload runat="server" ID="RadAsyncUpload" MultipleFileSelection="Disabled" TemporaryFolder="attachments"
                            TargetFolder="attachments" MaxFileSize="524288" OnFileUploaded="RadAsyncUpload_FileUploaded"  
                            OnClientValidationFailed="validationFailed" MaxFileInputsCount="1" OnClientFileUploadRemoved="RemoveErrorMessage">
                        </telerik:RadAsyncUpload>


 

public void RadAsyncUpload_FileUploaded(object sender, FileUploadedEventArgs e)
        {
            Label fileName = new Label();
            fileName.Text = e.File.FileName;
            string strFileName = string.Empty;
  
            if (itotalBytes < iMaxTotalBytes)
            {
                // Total bytes limit has not been reached, accept the file
                e.IsValid = true;
                itotalBytes += e.File.ContentLength;
            }
            else
            {
                // Limit reached, discard the file
                e.IsValid = false;
            }
  
            if (e.IsValid)
            {
                string targetFolder = RadAsyncUpload.TargetFolder;
                strFileName = e.File.FileName;
                //If same file uploaded again then it will overwrite.
                e.File.SaveAs(Path.Combine(Server.MapPath(targetFolder), strFileName));
            }
        }

It creates RadUploadTestFile file by default in attachment folder.
Why so?? Can we avoid that?

Plus it creates some wired ext file which i upload ... :(

Mugdha Aditya
Top achievements
Rank 1
 answered on 01 Dec 2011
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?