Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
158 views
hello, qaundo load radupload in a radwindow, the width of radupload see well, if I close and reopen the radwindow, the width of radupload is changed automatically decreased. You can also see the two pictures I posted before and after. I also write the code that is in use in aspx code behind to open the radwindow.
<telerik:RadWindow ID="RadWindowLoadprofile" runat="server"
ShowContentDuringLoad="false" Width="452px" Height="280px" Style="z-index: 8000"
Title="Caricamento immagine profilo" Behaviors="None" Modal="True" AutoSize="true"
Behavior="None" Font-Names="Verdana" Font-Size="Small" IconUrl="/image/iconlogo.png"
Skin="Office2010Silver" ReloadOnShow="false" VisibleStatusbar="False"
RestrictionZoneID="NavigateUrlZone" EnableViewState="False">
<ContentTemplate>
<div class="Divloadprofile">
<div id="upload" class="Divloadprofile1">
<telerik:RadAjaxPanel ID="RadAjaxPanelProfile" runat="server" HorizontalAlign="Center" ClientEvents-OnRequestStart="conditionalPostback">
<table style="border: 0px; margin: 0px; padding: 0px; width: 395px; text-align:center">
<tr>
<td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding-top: 5px; text-align: center; height:23px">
<asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validateRadUpload"
ErrorMessage="File errato" ValidationGroup="carica"></asp:CustomValidator>
</td>
</tr>
<tr>
<td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding-left:60px; vertical-align: top;">
<telerik:RadUpload ID="RadUpload1" Runat="server" Width="280px" InputSize="35"
AllowedFileExtensions=".jpg,.jpeg,.png,.gif" OverwriteExistingFiles="True"
TargetFolder="image/image_utenti" ControlObjectsVisibility="None"
Height="22px" style="text-align: left" Skin="Sunset"
MaxFileSize="3000000">
<Localization Select="Cerca" />
</telerik:RadUpload>
</td>
</tr>
<tr>
<td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; vertical-align: top; height: 50px">
<div class="Divinfoupload">
Il file deve avere le seguenti estensioni: jpg, jpeg, png, gif<br /> Il file
deve avere una grandezza massima di 3 Mb.<br /> Risoluzione ottimale
consigliata: 128x128 pixel.
</div>
</td>
</tr>
</table>
<div style="width:395px; padding-top: 10px">
<table style="width: 100%;">
<tr>
<td style="text-align:center">
<asp:ImageButton ID="Imgbtncarica" runat="server" ImageUrl="~/Image/Upload.png"
ValidationGroup="carica" />
</td>
<td style="text-align:center">
<asp:ImageButton ID="Imgbtnesci_6" runat="server" ImageUrl="~/Image/esci1.png" />
</td>
</tr>
</table>
</div>
</telerik:RadAjaxPanel>
</div>
<div id="conferma" class="Divloadprofile1" style="padding-top:10px;display:none">
<div>
<asp:Image ID="Imgprofile_2" runat="server" ImageUrl="~/Image/avatar.png" Height="250px" Width="250px" CssClass="AnteprimaImgmaxsize"/>
</div>
<div style="width:395px; padding-top: 10px">
<table style="width: 100%;">
<tr>
<td align="center">
<asp:ImageButton ID="Imgbtnesci_7" runat="server" ImageUrl="~/Image/esci1.png" />
</td>
</tr>
</table>
</div>
</div>
</div>
</ContentTemplate>
</telerik:RadWindow>

code behind:

Dim script As String = "function f(){$find(""" + RadWindowLoadprofile.ClientID + """).show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);"
ScriptManager.RegisterStartupScript(Me, Me.[GetType](), "key", script, True)

Plamen
Telerik team
 answered on 26 Mar 2013
1 answer
118 views
Hi everybody!
I'm trying to develop a custom add user form with telerik controls for asp .net.

here is my code:
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server" >
    <AjaxSettings>
         <telerik:AjaxSetting AjaxControlID="btnSaveAdd" EventName="Click">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="fields" UpdatePanelRenderMode="Block" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="txtAddUsername" EventName="OnTextChanged" >
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="txtAddUSername" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<div>
    <asp:Panel id="fields" runat="server">
        <div class="addUserRow">
            <label>Username</label>
            <telerik:RadTextBox runat="server" ID="txtAddUsername" ClientIDMode="Static" OnTextChanged="txtAddUsername_TextChanged" AutoPostBack="true"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>Alias</label>
            <telerik:RadTextBox runat="server" ID="txtAddAlias" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>Passowrd Temporanea</label>
            <telerik:RadTextBox runat="server" ID="txtAddPsw" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>E-Mail</label>
            <telerik:RadTextBox runat="server" ID="txtAddMail" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>Ruolo</label>
            <asp:DropDownList runat="server" ID="sltRole" ClientIDMode="Static"></asp:DropDownList>
        </div>
        <div class="addUserRow radioRow">
            <label>Tipo</label>
            <input type="radio" name="userType" value="Privato" class="btnRadio" id="rdPrivate" />privato
            <input type="radio" name="userType" value="Azienda" class="btnRadio" id="rdCompany" />Azienda
        </div>
        <div class="addUserRow">
            <label>Ragione Sociale</label>
            <telerik:RadTextBox runat="server" ID="txtAddRagSoc" Enabled="false" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>Nome</label>
            <telerik:RadTextBox runat="server" ID="txtAddName" Enabled="false" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
        <div class="addUserRow">
            <label>Cognome</label>
            <telerik:RadTextBox runat="server" ID="txtAddSurname" Enabled="false" ClientIDMode="Static"></telerik:RadTextBox>
        </div>
    </asp:Panel>
    <div class="buttonStripAdd">
        <telerik:RadButton runat="server" ID="btnCancelAdd" OnClientClicked="MyAxitea_Settings.CloseAddWin" Text="Annulla"></telerik:RadButton>
        <telerik:RadButton runat="server" ID="btnSaveAdd" OnClick="btnSaveAdd_Click" Text="Salva" UseSubmitBehavior="true" AutoPostBack="true" SingleClick="true"></telerik:RadButton>
    </div>
</div>

and I have some issues.

First of all I can't get any value inserted on client side on textboxes...
on page_load (if !IsPostBack) i write some random data inside textboxes, then I modify it and on save click I'm not able to get the modified value.
any idea? 

furthermore, if I remove SingleClick="true" I'm not even able to hit my breakpoint on btnSaveAdd_Click...
If I use SingleClick the button never gets back in enable state after first click...
in the end I added an OnTextChanged event to a textbox but I didn't manage to hit the handler on server side...
what am I doing wrong?

this code is inside an user control that will shows up on a kendo windows...while if I place this code in a brand new page it works...

Thanks 



Andrey
Telerik team
 answered on 26 Mar 2013
1 answer
179 views
Hi All,

I have the following requirement. I have a RadGrid in the payment page. I want to automatically update the Grid with new data every five minutes when it is displayed. I tried adding the timer control directly to the AJAX settings as updated control but it didnt worked. It would be helpful if anyone provides a sample solution.

Thanks in advance,
JC.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
4 answers
2.1K+ views
HI,
i have two rad datepicker  control. i want to valiate that User-entered date range should not exceed 90 days from the startdate using javascript. any one help me.
thx
chandrasekarank
Nital
Top achievements
Rank 1
 answered on 26 Mar 2013
1 answer
179 views
Hi,

There is a RadTextBox in my web page in which I want to perform a client side validation as the user enters text. So for the same, I have attached the OnValueChanged event but its not firing as the user types some text. Any help or suggestion?

Thanks,
Tia
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
1 answer
124 views
Hi,

Please let me know whether the RadTextBox provides support for the new HTML5 input types such as Number, Date etc.

Thanks,
Tia.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
1 answer
112 views
Hi,

How to give alternate background color to the RadCombobox dropdown list items? 

Thank you,
Saravanan.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
3 answers
135 views
I have created on login page using 2 Rad TextBox Control by UserName and Password. Once I login, from the browser, it did not prompt to remember password.

But when I create the login page using ASP.NET Textbox Control, then it prompt appear from the browser.

How can I resolve the problem using RadTextBox Control to prompt from browser to "Remember the Password"?

Please help urgent.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
1 answer
111 views
Hello,

I am completely new to Telerik RadControls and was struggling with how to dynamically load a user control into the RadAjaxPanel. I want a sample runnable application to understand the above. Any help appreciated.

Thanks and Regards,
Needha.
Princy
Top achievements
Rank 2
 answered on 26 Mar 2013
3 answers
310 views
Hello,

I am using a RadGrid and I want to insert a new item into the grid using the built-in RadGrid functionality.  The new item has been defined as follows:

<EditFormSettings EditFormType="Template">

<FormTemplate>

<div>

<h3>

New Team Culture Assessment

</h3>

<table>

<tr>

<td>

<asp:Label ID="EntitiesLabel" runat="server" Text="Entities"></asp:Label>

</td>

<td>

<asp:DropDownList ID="EntityList" runat="server" AutoPostBack="True"

OnSelectedIndexChanged = "Entity_selected">

</asp:DropDownList>

 

</td>

</tr>

<tr>

<td>

<asp:Label ID="TeamsLabel" runat="server" Text="Teams"></asp:Label>

</td>

<td>

<asp:DropDownList ID="TeamList" runat="server">

</asp:DropDownList>

</td>

</tr>

</table>

</div>

</FormTemplate>

</EditFormSettings

 

 

>

My questions:

1.  I want to populate the EntityList and TeamList drop-downs in the page-load using "object data source", but when I access them directly, I am getting an error saying that the name EntityList is not found in current context...here is what I am doing in !postback in page_load:

var bd = new BfEntityDAO();

List<BfEntity> ents = bd.GetEntities();

EntityList.DataSource = ents;

EntityList.DataTextField = "BfEntityName";

EntityList.DataBind();

How can I populate these drop-downs so that the user can see the values when he inserts a new item?

2.  When the user opens the insert form and selects an entity from the entitylist drop-down, I want to populate the teamlist drop-down based on the value selected in the entitylist drop-down.  How can I accomplish this?

This is the code snippet I am using currently in the codebehind, but the method is not being called:

 Method called when item in entity drop own list selected

===========================================

try
{

var cd = new TeamDAO();

List<Team> teams = cd.GetTeamsForEntity(entityDropDown.SelectedValue);

teamDropDown.DataSource = teams;
teamDropDown.DataTextField = "TeamName";
teamDropDown.DataValueField = "Id";
teamDropDown.DataBind();

}
catch (Exception ex)
{
Common.Utils.HandleException(ex);
}



3.  Finally, when the user clicks OK on the form, I want a insert the data into the database from the code-behind file. How can I get a callback to method in the code-behind and how can I access the data entered by the user?

Thank you

 

 

 

Shinu
Top achievements
Rank 2
 answered on 26 Mar 2013
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?