Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
58 views
Hello,

I have a line chart where both the series are starting from the middle of main gridlines. I want to start those from gridlines. Plz see attached image.

Also the axis labels need to appear from at the start of main grid lines and not in the middle
Tsvetie
Telerik team
 answered on 18 Apr 2011
1 answer
114 views

Hello,

I've places a Target-Source listbox on my User Registration form. Transferring items between de listboxes is no problem but when I commit the data with the Create User button I receive a 'Index was out of range' error.
Any idea?

See attached code.

<%@ Page Title="Register" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Register.aspx.cs" Inherits="YBS.Account.Register" %>
  
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>
  
  
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:CreateUserWizard ID="RegisterUser" runat="server" EnableViewState="False" 
        OnCreatedUser="RegisterUser_CreatedUser">
        <LayoutTemplate>
            <asp:PlaceHolder ID="wizardStepPlaceholder" runat="server"></asp:PlaceHolder>
            <asp:PlaceHolder ID="navigationPlaceholder" runat="server"></asp:PlaceHolder>
        </LayoutTemplate>
        <WizardSteps>
            <asp:CreateUserWizardStep ID="RegisterUserWizardStep" runat="server">
                <ContentTemplate>
                    <span class="failureNotification">
                        <asp:Literal ID="ErrorMessage" runat="server"></asp:Literal>
                    </span>
                    <asp:ValidationSummary ID="RegisterUserValidationSummary" runat="server" CssClass="failureNotification" 
                         ValidationGroup="RegisterUserValidationGroup"/>
                    <div class="accountInfo">
                        <fieldset class="register">
                            <legend><h2>Create a New Account</h2></legend>
                            <table runat="server" id="tblRegister" style="width:100%" border="0">
                              <tr>
                                <td align="right" style="width:125px"
                                  <asp:Label ID="NameLabel" runat="server" AssociatedControlID="tbName">Name:</asp:Label>
                                </td>
                                <td align="left">
                                  <asp:TextBox ID="tbName" runat="server" CssClass="textEntry"></asp:TextBox>
                                  <asp:RequiredFieldValidator ID="NameRequired" runat="server" ControlToValidate="tbName" 
                                       CssClass="failureNotification" ErrorMessage="Name is required." ToolTip="Name is required." 
                                       ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                </td>
                              </tr>
                              <tr>
                                <td align="right" style="width:125px">
                                  <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label
                                </td>
                                <td align="left">
                                  <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                                  <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                                       CssClass="failureNotification" ErrorMessage="User Name is required." ToolTip="User Name is required." 
                                       ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                </td>
                              </tr>
                              <tr>
                                <td align="right" style="width:125px"
                                  <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                                </td>
                                <td align="left">
                                  <asp:TextBox ID="Email" runat="server" CssClass="textEntry"></asp:TextBox>
                                  <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
                                       CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
                                       ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                </td>
                              </tr>
                              <tr>
                                <td align="right" style="width:125px">
                                  <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label
                                </td>
                                <td align="left">
                                  <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                  <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                                       CssClass="failureNotification" ErrorMessage="Password is required." ToolTip="Password is required." 
                                       ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                  <i>(Minimum of <%= Membership.MinRequiredPasswordLength %> characters required!)</i>
                                </td>
                              </tr>
                              <tr>
                                <td align="right" style="width:125px"
                                  <asp:Label ID="ConfirmPasswordLabel" runat="server" AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                </td>
                                <td align="left">
                                  <asp:TextBox ID="ConfirmPassword" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                                  <asp:RequiredFieldValidator ControlToValidate="ConfirmPassword" CssClass="failureNotification" Display="Dynamic" 
                                       ErrorMessage="Confirm Password is required." ID="ConfirmPasswordRequired" runat="server" 
                                       ToolTip="Confirm Password is required." ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>
                                  <asp:CompareValidator ID="PasswordCompare" runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                       CssClass="failureNotification" Display="Dynamic" ErrorMessage="The Password and Confirmation Password must match."
                                       ValidationGroup="RegisterUserValidationGroup">*</asp:CompareValidator>
                                </td>
                              </tr>
                              <tr>
                                <td align="right" style="width:125px">
                                </td>
                                <td align="left">
                                  <table id="tblCompany" runat="server">
                                    <tr>
                                      <td valign="top">
                                        <telerik:RadListBox ID="rlbSourceCompany" runat="server" Skin="Windows7" 
                                              AllowTransfer="True" TransferToID="rlbTargetCompany" Width="275px" Height="200px"
                                              DataKeyField="CompanyID" DataSourceID="SqlDSCompany" 
                                              DataTextField="Company">
                                          <HeaderTemplate>
                                            <center><asp:Label ID="lblSourceCompany" runat="server" Text="All companies" Font-Bold="true" /></center>
                                          </HeaderTemplate>
                                        </telerik:RadListBox>
                                      </td>
                                      <td valign="top">
                                        <telerik:RadListBox ID="rlbTargetCompany" runat="server" Skin="Windows7" Width="250px" Height="200px">
                                          <HeaderTemplate>
                                            <center><asp:Label ID="lblTargetCompany" runat="server" Text="Selected companies" Font-Bold="true" /></center>
                                          </HeaderTemplate>
                                        </telerik:RadListBox>
                                      </td>
                                    </tr>
                                  </table>
                                </td>
                              </tr>
                            </table>
                        </fieldset>
                        <p class="submitButton">
                            <asp:Button ID="CreateUserButton" runat="server" CommandName="MoveNext" Text="Create User" 
                                 ValidationGroup="RegisterUserValidationGroup"/>
                        </p>
                    </div>
                </ContentTemplate>
                <CustomNavigationTemplate>
                </CustomNavigationTemplate>
            </asp:CreateUserWizardStep>
<asp:CompleteWizardStep runat="server"></asp:CompleteWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>
                        <asp:SqlDataSource ID="SqlDSCompany" runat="server" 
        ConnectionString="<%$ ConnectionStrings:Yosi %>" SelectCommand="SELECT C.CompanyID, (C.Description + ' (' + D.Description + ')') AS Company
FROM SYS_Domain D
INNER JOIN SYS_Company AS C ON D.DomainID = C.DomainID 
ORDER BY D.Code, C.Code
"></asp:SqlDataSource>
</asp:Content>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Specialized;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Configuration;
  
using YBS.Membership;
using YBS.Manager;
using YBS.SQLDAL;
using YBS.SQLDAL.Entities;
  
using Telerik.Web;
using Telerik.Web.UI;
  
namespace YBS.Account
{
    public partial class Register : System.Web.UI.Page
    {
        private YBS.Manager.YBSBaseFunctions hdlBaseFunctions = new Manager.YBSBaseFunctions();
        public static String ConnString = ConfigurationManager.ConnectionStrings["Yosi"].ConnectionString;
  
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterUser.ContinueDestinationPageUrl = Request.QueryString["ReturnUrl"];
  
            SetObjectProperties();
        }
  
        protected void RegisterUser_CreatedUser(object sender, EventArgs e)
        {
            TextBox tbName = (TextBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("tbName");
  
            FormsAuthentication.SetAuthCookie(RegisterUser.UserName, false /* createPersistentCookie */);
  
            int _userID = new SYS_UserDAL().GetUserID(RegisterUser.UserName);
            hdlBaseFunctions.SetCurrentUserID(this.Context, _userID);
              
            if (tbName != null)
            {
                new YBSMembershipProvider().ChangeName(RegisterUser.UserName, tbName.Text);
            }
  
            SaveUserCompany(_userID);
  
            string continueUrl = RegisterUser.ContinueDestinationPageUrl;
            if (String.IsNullOrEmpty(continueUrl))
            {
                continueUrl = "~/";
            }
            Response.Redirect(continueUrl);
  
  
        }
  
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
  
            if (!Page.IsPostBack)
            {
                string sSQLCompany = "";
                sSQLCompany += "SELECT C.CompanyID, (C.Description + ' (' + D.Description + ')') AS Company ";
                sSQLCompany += "FROM SYS_Domain D ";
                sSQLCompany += "INNER JOIN SYS_Company AS C ON D.DomainID = C.DomainID ";
                sSQLCompany += "ORDER BY D.Code, C.Code";
  
                SqlDSCompany.SelectCommandType = SqlDataSourceCommandType.Text;
                SqlDSCompany.SelectCommand = sSQLCompany;
            }
        }
  
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
  
        }
  
        protected void SetObjectProperties()
        {
            RadListBox rlbSourceCompany = (RadListBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("rlbSourceCompany");
            RadListBox rlbTargetCompany = (RadListBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("rlbTargetCompany");
  
            if (rlbSourceCompany != null)
            {
                rlbSourceCompany.Skin = "Windows7";
                rlbSourceCompany.SelectionMode = ListBoxSelectionMode.Multiple;
                rlbSourceCompany.AllowTransferOnDoubleClick = true;
                rlbSourceCompany.Header.Visible = true;
                rlbSourceCompany.AllowTransferDuplicates = false;
                rlbSourceCompany.AllowReorder = false;
            }
  
            if (rlbTargetCompany != null)
            {
                rlbTargetCompany.Skin = "Windows7";
                rlbTargetCompany.AllowReorder = false;
                rlbTargetCompany.AllowDelete = false;
            }
        }
  
        protected void SaveUserCompany(int iUserID)
        {
/*
            RadListBox rlbTargetCompany = (RadListBox)RegisterUserWizardStep.ContentTemplateContainer.FindControl("rlbTargetCompany");
  
            if (rlbTargetCompany.Items.Count > 0)
            {
                foreach (RadListBoxItem rlbItem in rlbTargetCompany.Items)
                {
                    SYS_UserCompanyDAL.SYS_UserCompany _objUserCompany = new SYS_UserCompanyDAL.SYS_UserCompany();
  
                    _objUserCompany.UserID = iUserID;
                    _objUserCompany.CompanyID = Convert.ToInt32(rlbItem.DataKey);
                }
            }
 */
        }
    }
}
Peter Filipov
Telerik team
 answered on 18 Apr 2011
1 answer
62 views
Hi,

I have a web application in which I am currently using Microsoft's standard upload control.  However, users are having problems with uploads not completing when they try it from locations with poor connectivity.

Questions:

1. Could your upload control improve the situation?

2. Can your upload be restarted, i.e., if a timeout occurs does it save what was already received so that it can pick up from where it left off?

3. Are there IIS changes that you recommend to better handle upload processing?

Thank you

Genady Sergeev
Telerik team
 answered on 18 Apr 2011
9 answers
220 views
Hi

Having a slight issue when I want to change the background image on the grid header from the default one using css.

.RadGrid_Default .rgHeader
{
    background:#ffffff repeat-x url('/images/GridHeader-BG.gif');
}
  
.RadGrid_Default th.rgSorted
{
    background:#ffffff repeat-x url('/images/GridHeader-BG.gif');!important;
    background-color:#ffffff;

}

The Header background images does indeed change to the correct image. However as soon as I do a sort it reverts back to the default. 

Do I need to do anything more to stop this from happening than just css?

Regards,
Soeren 
Galin
Telerik team
 answered on 18 Apr 2011
1 answer
73 views
Can anyone tell me what the security ramifications of using RadAsyncUpload to upload files to a server are, depending on whether Flash is disabled, etc. For instance, if someone were to try an upload a malicious file with a benign file extension would the specific process by which the file is manipulated by the RadAsyncUpload control render the file harmless... or do specific security precautions need to be taken both on the final destination director and the RadUploadTemp Directory to make sure malicous files cannot do harm? 
Genady Sergeev
Telerik team
 answered on 18 Apr 2011
6 answers
156 views
Hi ,

I am using latest version of file explorer. It is cool.
In it I saw that we cannot assign a Keyboard shortcut for Rename, where as we can assign the keyboard shortcuts for Delete,Upload,Create New Folder etc.,
I want to use "F2" as a keyboard shortcut for Renaming a Folder instead of right clicking on the Folder and then click on Rename.
Can you help me how to achieve it?

Thanks and regards,
Naveen
Dobromir
Telerik team
 answered on 18 Apr 2011
1 answer
130 views
I have a RadNumericTextBox set to Type="Percent". I want the user to be able to enter numbers 0 - 100 with one decimal place. "100.0" is 5 characters so I set the MaxLength to 5. The code is below:

<telerik:RadNumericTextBox ID="textInput" Type="Percent" MaxLength="5" runat="server" />
<asp:Button ID="buttonUpdate" Text="Calculate" OnClick="ButtonUpdate_Click" runat="server" />

This works as expected in IE8 and Firefox4. But in Chrome 10 it does not work. When I click the button the focus goes to the text box because an error is detected in the input even if the number of characters entered is less than 5. If I increase the MaxLength to 20 it works in Chrome. It seems that Chrome is applying the MaxLength value to the formatted value ("2.00 %"), but IE and Firefox apply the MaxLength to the characters that the user enters. Is there a workaround for this problem?

I am using Telerik 2010 Q2.
Radoslav
Telerik team
 answered on 18 Apr 2011
1 answer
470 views
so far, I've figured out how to get and set values of a RadNumericTextBox within a RadGrid during edit mode using the following Javascript.

                //GET QUANTITY
                var quantityId = $telerik.$("[id$='Quantity']").attr('id'); //get Client ID of RadNumericTextbox with Id 'Quantity'
                var quantityControl = $find(quantityId);                    //get control
                var quantityValue = quantityControl.get_value();             //get value stored in control


                //SET QUANTITY
                quantityControl .set_value(5);                //set value in control


My problem is that in edit mode, this code only works for RadNumericTextBoxes in the very first row. It simply fails for all other rows. I believe it's because the $telerik.$("[id$='Quantity']").attr('id'); isn't able to find the client id for the other rows correctly.

I've look at several examples here and in forums and I'm unable to find a solution.

Also, speed is a primary concern. When the user changes the value for one textbox in the row, I use these gets and sets to perform instantaneous calculations on values contained within other textboxes within that same row.

Thanks for any help you can provide!
Princy
Top achievements
Rank 2
 answered on 18 Apr 2011
1 answer
49 views
Hello,

I have a radtooltip with a description and some priceinfo. Is it possible to put htmltags (<br /> and <p>) in a radtooltip. And if so, how can I accomplish this.

Thanx in advance.

Patrick

Patrick
Top achievements
Rank 1
 answered on 18 Apr 2011
1 answer
228 views
i put rad binary image in asp:hyperlink and disply image from sql server2005 with size 100 X 100 now when i click on image i want to open 500 X 500 size image i give in hyperlink targer="_blank" means display large image on new page 

as soon as posible please help me for this type of senario 

tanking You
Veli
Telerik team
 answered on 18 Apr 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?