Telerik Forums
UI for ASP.NET AJAX Forum
14 answers
908 views
Good evening. We are using radupload. And we have set the max filesize at 1GB. If the filesize for the file to be uploaded exceeds this limit., "Page not found" error is displayed. Is there any way we can find the filesize before it is uploaded, to make sure it does not exceed this limit,in order to avoid this error? May be some validation on OnClientFileSelected event of radupload control. Please let us know.
Thanks
Anil
Genady Sergeev
Telerik team
 answered on 12 Dec 2011
2 answers
174 views

I have a document library "DOCLibA", in my sharepoint 2010 site which also collects some metadata for the document like category and country associated(using EditForm.aspx). I have another list "listB", in which I want users to add links to documents from above document library "DOCLibA".

On the "listB" NewForm I have a telerik radeditor with document manager in the toolbar. This document manager correctly uploads any new documents in the "DOCLibA",but it doesnot ask for the metadata like category and country.

Is there a way to achive this functionality using Document Manager? Sharepoint Asset picker works correctly for this as the upload link takes you to the doc lib's Upload.aspx.

A B
Top achievements
Rank 1
 answered on 12 Dec 2011
3 answers
415 views
Is it possible to create a RadWindow in code behind that uses the Page.LoadControl() function and display it. At runtime I need to create an unknown number of RadWindows that are not modal and populate their ContentContainer.Controls with dynamically loaded user controls.

I am using Visual Studio 2010 SP1 with Telerik RadControls for ASP.NET Ajax version 2011.3.1115.40 against the .NET 4 framework
Marin Bratanov
Telerik team
 answered on 12 Dec 2011
4 answers
342 views
Hi there,
Im using radgrid with checkboxcolumn. Im aware of, checkbox is only  enable on editable mode(i.e..after clicking edit button). My problem is, for a normal mode checkbox doesn't show clearly in  some browsers like mozila,etc... I need to improve the visibility of the checkbox in normal mode(probably set the border color)..Is it possible to apply css for checkbox inside a checkboxcolumn or highlight the border color in a normal mode?....Thanks in advance,,

Regards,
Suresh
suresh
Top achievements
Rank 1
 answered on 12 Dec 2011
1 answer
99 views
Hi,

I am using RadUpload control. I am not able to type-in the File path or do a copy/paste the file path in the input area of the control.

Please help.

Regards,
Sudhanva
Bozhidar
Telerik team
 answered on 12 Dec 2011
0 answers
97 views
Hi,

I am using telerik rad combo box of version 2.7.2.0 in visual studio 2003.I am getting  error like:
"RadcomboBox: Server error in the ItemRequested event handler.press ok to view the result "
Please find attached error screen shot.
I analysed that it uses Load on demand property with ItemsRequested event.
Is this error occurs because of this reason?
I checked in other application, that application is built using .net 2.0 and it uses 2.8.1.0 telerik version.
This application not uses Load on demand property.
but in this application above error is not coming.
Hence i tried to using 2.8.1.0 version in visual studio 2003 application but it is not allowing me to add the RadCombobox.Net2 version in the visual studio 2003 application.

Does RadCombobox.Net2 version  2.8.1.0 supports visual studio 2003 application?

Please help me to come out of the above error marked in red.

Please do reply me  ASAP.

Thanks In Advance,
Namrata
Namrata
Top achievements
Rank 1
 asked on 12 Dec 2011
2 answers
115 views
In Edit form , I have two comboboxes : combobox1 & combobox2. On change of combobox1 value, I want to set combobox2 value. The problem is, I am not able to handle combobox1 selectedIndexChnaged event.

Can anyone give a code sample or pointer on how to achieve it? Thank you very much in advance.


Here is the ASPX code :

 <telerik:TreeListTemplateColumn DataField="PricingTypeName" UniqueName="PricingTypeName" HeaderText="PricingType" >
                 <ItemTemplate>
                 <%# Eval("PricingTypeName")%>
                 </ItemTemplate>
                 <EditItemTemplate>
                        <asp:DropDownList ID="combobox1" runat="server">
                        </asp:DropDownList>
                  </EditItemTemplate>
               
                 </telerik:TreeListTemplateColumn>

  <telerik:TreeListTemplateColumn DataField="PurchaseUnitofMeasureName" UniqueName="PurchaseUnitofMeasureName" HeaderText="PurchaseUnitofMeasure" >
                 <ItemTemplate>
                 <%# Eval("PurchaseUnitofMeasureName")%>
                 </ItemTemplate>
                 <EditItemTemplate>
                        <asp:DropDownList ID="combobox2" runat="server">
                        </asp:DropDownList>
                  </EditItemTemplate>
                
                 </telerik:TreeListTemplateColumn>


Kushal
Top achievements
Rank 1
 answered on 12 Dec 2011
3 answers
426 views
Hi,

I have followed your examples posted in other threads(http://www.telerik.com/community/forums/aspnet-ajax/grid/about-exporttopdf-of-radgrid.aspx) regarding this.  My code works locally, but on the server the pdf is still showing #### for Chinese characters.  Originally I thought the problem was because the font Arial Unicode MS was not installed on the server.  I had it installed and it's still not displaying correctly.  Thanks in advance.

Ryan
Daniel
Telerik team
 answered on 12 Dec 2011
1 answer
147 views
I have a login Page,.
I need simulate 2 enters.

The first one : when user press Enter in userName --> set focus in Pass textbox
When user press in Pass -> simulate Enter (login)

I try, I it does nto work..


This is my code

Aspx

<%

 

@ Page Title="" Language="C#" MasterPageFile="~/UI/Home.Master" AutoEventWireup="true"

 

 

 

CodeBehind="Login.aspx.cs" Inherits="WebSearch.UI.Registration.Login" %>

 

<

 

 

asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

 

</

 

 

asp:Content>

 

<

 

 

asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="loginPanel_DIV" LoadingPanelID="RadAjaxLoadingPanel1"/>

 

 

 

<telerik:AjaxUpdatedControl ControlID="pnlResetPass_DIV" LoadingPanelID="RadAjaxLoadingPanel" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="btnSave">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="loginPanel_DIV" LoadingPanelID="RadAjaxLoadingPanel1"/>

 

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="hlForgotPassword">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="pnlResetPass_DIV" LoadingPanelID="RadAjaxLoadingPanel1"/>

 

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />

 

 

 

<div runat="server" ID="loginPanel_DIV">

 

 

 

<asp:Panel ID="loginPanel" runat="server">

 

 

 

 

<div class="containerRegistration" runat="server" >

 

 

 

 

<div class="titleRegistration">

 

 

 

<div class="lblTitle">

 

 

 

<asp:Label runat="server" ID="lblTitle" /> <asp:Label ID="lblLogOfftext" runat="server" CssClass="logOff"></asp:Label> </div>

 

 

 

</div>

 

 

 

<div class="loginContainer">

 

 

 

<div class="labelLogin">

 

 

 

<asp:Label runat="server" ID="lblLoginId" /></div>

 

 

 

<div class="textBoxLogin">

 

 

 

<asp:TextBox runat="server" ID="txtloginId" MaxLength="50" Width="200px" />

 

 

 

<asp:RequiredFieldValidator CssClass="validator" ControlToValidate="txtloginId" runat="server"

 

 

 

ErrorMessage="*" ValidationGroup="Login"></asp:RequiredFieldValidator>

 

 

 

 

</div>

 

 

 

<div class="clear">

 

 

 

</div>

 

 

 

<div class="labelLogin">

 

 

 

<asp:Label runat="server" ID="lblPass" /></div>

 

 

 

<div class="textBoxLogin">

 

 

 

<asp:TextBox runat="server" AutoPostBack="true" AutoCompleteType="None" ID="txtPass" MaxLength="50" TextMode="Password" Width="200px" />

 

 

 

<asp:RequiredFieldValidator CssClass="validator" ControlToValidate="txtPass" runat="server"

 

 

 

ErrorMessage="*" ValidationGroup="Login"></asp:RequiredFieldValidator>

 

 

 

<div class="clear">

 

 

 

</div>

 

 

 

<asp:CustomValidator ID="cvLoginId" runat="server" Display="Dynamic" ControlToValidate="txtPass"

 

 

 

CssClass="validator" OnServerValidate="cvLoginId_ServerValidate" ValidationGroup="Login"></asp:CustomValidator></div>

 

 

 

<div class="remember">

 

 

 

<asp:CheckBox runat="server" ID="chkRemember"></asp:CheckBox>

 

 

 

 

&nbsp;&nbsp;&nbsp;&nbsp;

 

 

 

 

<asp:LinkButton ID="hlForgotPassword" runat="server" OnClick="hlForgotPassword_Click" CausesValidation="true" ValidationGroup="Forgot"></asp:LinkButton>

 

 

 

 

</div>

 

 

 

<div class="buttonLogin" style="position: static">

 

 

 

<telerik:RadButton Width="40px" runat="server" ID="btnLogin" Skin="Vista" OnClick="btnLogin_Click" ValidationGroup="Login">

 

 

 

</telerik:RadButton>

 

 

 

<telerik:RadButton runat="server" Width="40px" ID="btnCancel" Skin="Vista">

 

 

 

</telerik:RadButton>

 

 

 

</div>

 

 

 

 

<div style="width: 100%; margin-left: 60%; margin-top:5%;">

 

 

 

<asp:Label ID="lblValidationText" Style="margin-top: 15px" CssClass="validator" runat="server"

 

 

 

Font-Italic="true"></asp:Label></div>

 

 

 

</div>

 

 

 

</div>

 

 

 

</asp:Panel>

 

 

 

</div>

 

 

 

 

<div id="pnlResetPass_DIV" runat="server">

 

 

 

<asp:Panel ID="pnlResetPass" runat="server">

 

 

 

<div class="containerRegistrationReset" runat="server" >

 

 

 

<div class="titleRegistration">

 

 

 

<div class="lblTitle">

 

 

 

<asp:Label runat="server" ID="lblReset" /></div>

 

 

 

</div>

 

 

 

<div style="width: 100%; margin-left: 10%">

 

 

 

<asp:Label ID="lblInformation" Style="margin-top: 15px" CssClass="validator" runat="server" Visible="false"

 

 

 

Font-Italic="true"></asp:Label></div>

 

 

 

<div class="loginContainer">

 

 

 

<div class="labelLogin">

 

 

 

<asp:Label runat="server" ID="lblUserId" /></div>

 

 

 

<div class="textBoxLogin">

 

 

 

<asp:TextBox runat="server" ID="txtUserId" MaxLength="50" Width="200px" />

 

 

 

<asp:RequiredFieldValidator ID="RequiredFieldValidator1" CssClass="validator" ControlToValidate="txtUserId"

 

 

 

runat="server" ErrorMessage="*" ></asp:RequiredFieldValidator>

 

 

 

<br />

 

 

 

<asp:CustomValidator ID="cvExistLogin" runat="server" CssClass="validator" ControlToValidate="txtUserId"

 

 

 

OnServerValidate="cvExistLogin_ServerValidate" Display="Dynamic"></asp:CustomValidator>

 

 

 

 

</div>

 

 

 

<div class="clear"></div>

 

 

 

<div class="buttonLogin" style="position: static">

 

 

 

<telerik:RadButton Width="40px" runat="server" ID="btnReset" Skin="Vista" OnClick="btnReset_Click" >

 

 

 

</telerik:RadButton>

 

 

 

<telerik:RadButton runat="server" Width="40px" ID="btnCancelReset" Skin="Vista" OnClick="CancelReset_Click">

 

 

 

</telerik:RadButton>

 

 

 

</div>

 

 

 

 

</div><br />

 

 

 

<div style="width: 100%; margin-left: 60%">

 

 

 

<asp:Label ID="lblValidation" Style="margin-top: 15px" CssClass="validator" runat="server"

 

 

 

Font-Italic="true"></asp:Label></div>

 

 

 

<br />

 

 

 

 

</div>

 

 

 

</asp:Panel>

 

 

 

</div>

 

 

</

 

 

asp:Content>

 



ASPX.Cs

using

 

 

System;

 

using

 

 

System.Globalization;

 

using

 

 

System.Resources;

 

using

 

 

System.Web;

 

using

 

 

WebSearch.Components;

 

using

 

 

WebSearch.SecurityModel;

 

 

namespace

 

 

WebSearch.UI.Registration

 

{

 

 

public partial class Login : System.Web.UI.Page

 

{

#region

 

 

Properties&Variables

 

 

 

 

private string _culture;

 

 

 

private readonly smOrganization _organization = new smOrganization();

 

 

 

private ResourceManager _resources;

 

#endregion

#region

 

 

Events

 

 

 

protected void Page_Load(object sender, EventArgs e)

 

{

 

 

if (Page.IsPostBack) return;

 

 

LoadSettings();

LoadLogin();

}

 

 

protected void Page_Init(object sender, EventArgs e)

 

{

GetInfo();

}

 

 

protected void btnReset_Click (object sender, EventArgs e)

 

{

 

 

if (!Page.IsValid) return;

 

_organization.User = _organization.GetUser(_organization.GetUser(txtUserId.Text));

_organization.SendPasswordChangeEmail();

lblInformation.Visible =

 

true;

 

}

 

 

protected void btnLogin_Click(object sender, EventArgs e)

 

{

LoginUser();

}

 

 

protected void cvLoginId_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)

 

{

_organization.User =

 

new smUser {Loginid = txtloginId.Text, Password = Encript.EncryptText(txtPass.Text)};

 

 

 

 

if (_organization.ExistLogin(txtloginId.Text, 0) == false || _organization.LoginUser() == false)

 

{

args.IsValid =

 

false;

 

}

 

 

else

 

{

args.IsValid =

 

true;

 

 

 

App.SetCurrentUserId(_organization.GetUser(txtloginId.Text));

 

}

 

}

 

 

 

protected void CancelReset_Click(object sender, EventArgs e)

 

{

cvExistLogin.Enabled =

 

false;

 

loginPanel.Visible =

 

true;

 

pnlResetPass.Visible =

 

false;

 

Response.Redirect(

 

"~/UI/Registration/Login.aspx");

 

}

 

 

protected void cvExistLogin_ServerValidate(object source, System.Web.UI.WebControls.ServerValidateEventArgs args)

 

{

args.IsValid = _organization.ExistLogin(txtUserId.Text, 0);

}

 

 

protected void hlForgotPassword_Click(object sender, EventArgs e)

 

{

cvExistLogin.Enabled =

 

true;

 

loginPanel.Visible =

 

false;

 

pnlResetPass.Visible =

 

true;

 

LoadSettingForgot();

}

 

 

protected void txtPass_OnTextChanged(object sender, EventArgs e)

 

{

LoginUser();

}

#endregion

 

#region

 

 

Method

 

 

 

private void LoginUser()

 

{

Page.Validate(

 

"Login");

 

 

 

if (!ValidateFailedUser(txtloginId.Text))

 

{

lblLogOfftext.Text = _resources.GetString(

 

"errorUser" , new CultureInfo(_culture));

 

RadAjaxManager1.Alert(_resources.GetString(

 

"errorUser" , new CultureInfo(_culture)));

 

 

 

return;

 

}

 

 

 

if (!Page.IsValid) return;

 

 

 

 

if (chkRemember.Checked)

 

{

 

 

HttpCookie authUser = Request.Cookies.Get("authUser");

 

 

 

if (authUser== null)

 

{

authUser =

 

new HttpCookie("authUser");

 

Response.Cookies[

 

"authUser"].Expires = DateTime.Now.AddDays(App.GetExpireDays());

 

authUser.Values.Add(

 

"authUserName", txtloginId.Text);

 

Response.Cookies.Add(authUser);

}

}

 

 

else

 

{

 

 

HttpCookie authUser = new HttpCookie("authUser") {Expires = DateTime.Now.AddDays(-1d)};

 

Response.Cookies.Add(authUser);

}

 

 

App.GetControls();

 

 

 

App.GetPersistenceTable();

 

Response.Redirect(

 

"~/UI/DocumentsList.aspx");

 

}

 

 

 

private bool ValidateFailedUser(string loginId)

 

{

 

 

return _organization.ValidateFailedUser(loginId);

 

}

 

 

 

private void LoadSettingForgot()

 

{

lblReset.Text = _resources.GetString(lblReset.ID,

 

new CultureInfo(_culture));

 

lblUserId.Text = _resources.GetString(lblLoginId.ID,

 

new CultureInfo(_culture));

 

 

}

 

 

private void LoadLogin()

 

{

 

 

HttpCookie authUser = Request.Cookies.Get("authUser");

 

 

 

if (authUser != null)

 

{

txtloginId.Text = authUser.Values[

 

"authUserName"];

 

}

}

 

 

private void LoadSettings()

 

{

lblTitle.Text = _resources.GetString(lblTitle.ID,

 

new CultureInfo(_culture));

 

lblLoginId.Text = _resources.GetString(lblLoginId.ID,

 

new CultureInfo(_culture));

 

lblPass.Text = _resources.GetString(lblPass.ID,

 

new CultureInfo(_culture));

 

btnLogin.Text = _resources.GetString(btnLogin.ID,

 

new CultureInfo(_culture));

 

btnCancel.Text = _resources.GetString(btnCancel.ID,

 

new CultureInfo(_culture));

 

chkRemember.Text = _resources.GetString(chkRemember.ID,

 

new CultureInfo(_culture));

 

cvLoginId.ErrorMessage = _resources.GetString(cvLoginId.ID,

 

new CultureInfo(_culture));

 

hlForgotPassword.Text = _resources.GetString(hlForgotPassword.ID,

 

new CultureInfo(_culture));

 

lblInformation.Text = _resources.GetString(lblInformation.ID,

 

new CultureInfo(_culture));

 

lblValidationText.Text = _resources.GetString(lblValidationText.ID,

 

new CultureInfo(_culture));

 

lblValidation.Text = _resources.GetString(lblValidationText.ID,

 

new CultureInfo(_culture));

 

cvExistLogin.ErrorMessage = _resources.GetString(cvExistLogin.ID,

 

new CultureInfo(_culture));

 

btnReset.Text = _resources.GetString(btnReset.ID,

 

new CultureInfo(_culture));

 

btnCancelReset.Text = _resources.GetString(btnCancelReset.ID,

 

new CultureInfo(_culture));

 

cvExistLogin.Enabled =

 

false;

 

pnlResetPass.Visible =

 

false;

 

 

 

if ( (Request.Cookies["authUser"] != null)) chkRemember.Checked = true;

 

 

 

if (Request.QueryString["L"] == "Off")

 

{

lblLogOfftext.Text = _resources.GetString(lblLogOfftext.ID,

 

new CultureInfo(_culture));

 

}

 

 

}

 

 

private void GetInfo()

 

{

_culture =

 

App.CurrentCulture();

 

_resources =

 

App.GetRegistrationResources("Login");

 

}

 

#endregion

 

}

}





Princy
Top achievements
Rank 2
 answered on 12 Dec 2011
3 answers
176 views
Hello,

I want to know how to access nested radgrid and controls from vb code.

my code is look like this:

<telerik:RadGrid ID="RadGrid1" >
    <MasterTableView >
        <NestedViewTemplate>
                <telerik:RadMultiPage >
                    <telerik:RadPageView >
                        <telerik:RadGrid ID="RadGrid2">
                            <MasterTableView >
                                <ItemTemplate>
                                        <asp:Label ID="Label1" />
                                </ItemTemplate>
                                <Columns>
                                    some code here..
                                </Columns>
                            </MasterTableView>
                        </telerik:RadGrid>
                    </telerik:RadPageView>
                </telerik:RadMultiPage>
        </NestedViewTemplate>
        <Columns>
          some code here..
      </Columns>
    </MasterTableView>
</telerik:RadGrid>

I need to access radgrid2 and label1.

Any Idea please?
Shinu
Top achievements
Rank 2
 answered on 12 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?