Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
162 views
Hi freinds,
I am using radalert in codebehind for displaying message and after desplaying message am calling another javascript function to retun to the parent page.
following is my code.

private

 

bool UpdateCounter()

 

{

 

 

    string radalerts = "<script language='javascript'>function save(){radalert('Counter Saved Succesfully!', 330, 210); Sys.Application.remove_load(save);};     Sys.Application.add_load(save);</script>";

 

Page.ClientScript.RegisterStartupScript(

 

this.GetType(), "radalert", radalerts);
return true;

 

}

 

if

 

 

(UpdateCounter())

 

{

hdnChange.Value =

 

"Y";

 

ClearControl();

Page.RegisterStartupScript(

 

"myScript", "<script language=JavaScript>returnToParent();</script>");

 

}

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> 
<script type="text/javascript"> 
function returnToParent() { 
var oArg = new Object(); 
var oWnd = GetRadWindow(); 
oArg.IsChange = $get(
"<%=hdnChange.ClientID%>").value;

 

 

oWnd.close(oArg);

}

 

 

</script>

 

 

 

</telerik:RadCodeBlock>

but my radalert not displaying any message its just close the popup window and return to parent window without showing any radalert.

What is the wrong with above.
please help
Thanks in advance.
Manoj Gupta

 

 

 

 

Georgi Tunev
Telerik team
 answered on 07 Dec 2010
3 answers
158 views
Hi,

using async upload is working fine, i am able to choose multiple files and after the first upload i enable the upload button.

But when i cancel/remove some files to upload, i choose another file to upload, sometimes the next div/control (Label and Remove button) appears underneath the textbox and search button div/control from the async upload control.

using IE 7.05.730

Anyone already expirienced this problem?

thanks Mario
Mario
Top achievements
Rank 2
 answered on 07 Dec 2010
1 answer
123 views
Hello,

When the user clicks on a tab, I want to fire the radconfirm window to ask them if they want to proceed.  Now, I cancel the event, fire radconfirm, and in the callback, if successful, I'm trying to explicitly postback to show the new tab.  I tried doing:

//In tabSelecting event on client
e.get_tab().select(); //to select the new tab because I canceled the selection earlier on
sender._postback(e.get_tab()); //to perform the postback

The RadMultiPage gets updated to the new tab's content, but the RadTabStrip does not show me the new tab selected.  I see the old tab selected with the new tab's content.

Any ideas?

UPDATE
I also tried setting the selected index of the tab strip, or calling set_selected() on the tab.  Maybe this is a bug?

Thanks.
Dimitar Terziev
Telerik team
 answered on 07 Dec 2010
4 answers
90 views
I'm trying to use the RadTimePicker in a grid row in edit mode (Inplace or editform is the same) but if I click on popup button the table it's not show.

I've try to use the control stand-alone, not in the grid, and in this mode the control work correctly.

Thanks.
Flavio Dossena

Here the source used:
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="WebUserControl.ascx.vb"
    Inherits="privato_WebUserControl" %>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadGrid1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
**** this work correctly
<telerik:RadTimePicker ID="RadTimePicker1" runat="server" Skin="Web20">
</telerik:RadTimePicker>
**** this work correctly
<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
    GridLines="None" AllowAutomaticUpdates="True" OnItemUpdated="RadGrid1_ItemUpdated"
    Skin="Sunset">
    <MasterTableView DataSourceID="ObjectDataSource1" DataKeyNames="seqGiorno" EditMode="InPlace">
        <RowIndicatorColumn>
            <HeaderStyle Width="20px" />
        </RowIndicatorColumn>
        <Columns>
            <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn">
                <ItemStyle CssClass="MyImageButton" />
            </telerik:GridEditCommandColumn>
            <telerik:GridBoundColumn DataField="idGiorno" DataType="System.Int64" HeaderText="idGiorno"
                SortExpression="idGiorno" UniqueName="idGiorno" Visible="False" Display="False"
                Groupable="False" ReadOnly="True">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn DataField="nomeGiorno" HeaderText="nomeGiorno" SortExpression="nomeGiorno"
                UniqueName="nomeGiorno" Groupable="False" ReadOnly="True">
            </telerik:GridBoundColumn>
            *** don't work
            <telerik:GridDateTimeColumn UniqueName="mattinoOraApertura" DataField="mattinoOraApertura"
                PickerType="TimePicker" HeaderText="Ora Inizio" DataType="System.TimeSpan">
            </telerik:GridDateTimeColumn>
            *****
            <telerik:GridTemplateColumn DataField="mattinoOraChiusura" DataType="System.TimeSpan"
                Groupable="False" HeaderText="mattinoOraChiusura" SortExpression="mattinoOraChiusura"
                UniqueName="mattinoOraChiusura">
                <EditItemTemplate>
                    *** don't work
                    <telerik:RadTimePicker ID="mattinoOraChiusuraTextBox" dbselectdate='<%# Eval("mattinoOraChiusura") %>'
                        runat="server">
                    </telerik:RadTimePicker>
                    ******
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="mattinoOraChiusuraLabel" runat="server" Text='<%# Eval("mattinoOraChiusura") %>'></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn>
            <telerik:GridBoundColumn DataField="seqGiorno" DataType="System.Int64" HeaderText="seqGiorno"
                SortExpression="seqGiorno" UniqueName="seqGiorno" Groupable="False" Display="False"
                ReadOnly="True" Visible="False">
            </telerik:GridBoundColumn>
            <telerik:GridCheckBoxColumn DataField="ricPrenotazione" HeaderText="ricPrenotazione"
                UniqueName="ricPrenotazione" EditFormColumnIndex="1">
            </telerik:GridCheckBoxColumn>
        </Columns>
        <EditFormSettings>
            <EditColumn UniqueName="EditCommandColumn1">
            </EditColumn>
        </EditFormSettings>
    </MasterTableView>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default" EnableImageSprites="True">
    </HeaderContextMenu>
</telerik:RadGrid>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="GetData" TypeName="myDataSetTableAdapters.tblGiorniAperturaAdapter"
    UpdateMethod="UpdateGiornoQuery">
    <UpdateParameters>
        <asp:Parameter Name="mattinoOraApertura" Type="DateTime" />
        <asp:Parameter Name="mattinoOraChiusura" Type="DateTime" />
        <asp:Parameter Name="ricPrenotazione" Type="Int32" />
        <asp:Parameter Name="Original_seqGiorno" Type="Int32" />
    </UpdateParameters>
</asp:ObjectDataSource> 
Tsvetoslav
Telerik team
 answered on 07 Dec 2010
1 answer
117 views
Hi Experts,
I am working on Visual webpart in sharepoint 2010 which used Telerik Radinput Controls and also doing on validation but its not working i am getting error when i click on Send
The file is not checked out.  You must first check out this document before making changes.
Please find html and managed code for your reference.
<asp:Panel ID="formContainer" runat="server" CssClass="formWrapper">
<%--<%--<%--<asp:Label runat="server" Text="Hi,How are you?"></asp:Label>--%>
    <div id="ControlContainer">
          <!--Name-->
          <div>
                <table>
                     <tr>
                         <td class="label"><b>Name</b> </td>
                         <td><Telerik:RadTextBox ID="txtName" runat="server" EmptyMessage="Please Enter Name...." Width="180px" ></Telerik:RadTextBox></td>
                         <td style="color:Red;">
                                <asp:RequiredFieldValidator ID="txtNameRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="txtName" 
                                                            ErrorMessage="Required" EnableClientScript="false" />
                         </td>
                     </tr>
               </table>
          </div>
          <!--Email-->
          <div>
                <table>
                     <tr>
                         <td class="label"><b>E-mail</b> </td>
                         <td><Telerik:RadTextBox ID="txtEmail" runat="server" EmptyMessage="Please Enter Valid Email...." Width="180px"></Telerik:RadTextBox></td>
                         <td style="color:Red;" >
                             <asp:RequiredFieldValidator ID="txtEmailRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="txtEmail" ErrorMessage="Required" 
                                                         EnableClientScript="false" />
                             <asp:RegularExpressionValidator ID="emailValidator" runat="server" Display="Dynamic" ErrorMessage="Please, enter valid e-mail address." 
                                                             ValidationExpression="^[\w\.\-]+@[a-zA-Z0-9\-]+(\.[a-zA-Z0-9\-]{1,})*(\.[a-zA-Z]{2,3}){1,2}$"
                                                             ControlToValidate="txtEmail" ForeColor="Red" EnableClientScript="false" />
                        </td>
                     </tr>
                </table>
          </div>
          <!--Subject-->
          <div>
                <table>
                     <tr>
                         <td class="label"><b>Subject</b> </td>
                         <td><Telerik:RadTextBox ID="txtSubject" runat="server" EmptyMessage="Please Enter Subject...." Width="180px"></Telerik:RadTextBox></td>
                         <td style="color:Red;">
                             <asp:RequiredFieldValidator ID="txtSubjectRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="txtSubject" ErrorMessage="Required" 
                                                         EnableClientScript="false" />
                         </td>
                    </tr>
               </table>
         </div>
         <!--Body-->
         <div>
              <table>
                    <tr>
                         <td class="label"><b>Body</b> </td>
                         <td><Telerik:RadTextBox ID="txtBody" runat="server" TextMode="MultiLine" EmptyMessage="Please type detail message...." Width="350px" Height="150px"></Telerik:RadTextBox></td>
                         <td style="color:Red;">
                            <asp:RequiredFieldValidator ID="txtBodyRequiredFieldValidator" runat="server" Display="Dynamic" ControlToValidate="txtBody" ErrorMessage="Required" 
                                                        EnableClientScript="false"  />
                         </td>
                    </tr>
             </table>
        </div>
        <!--Captcha-->
        <div>
               <table>
                    <tr>
                         <td class="label"></td>
                         <td><Telerik:RadCaptcha ID="RadCaptcha1" runat="server" CaptchaImage-TextLength="5" ErrorMessage="The code you entered is not valid." CaptchaTextBoxCssClass="textBox" 
                                                 CaptchaImage-TextChars="LettersAndNumbers" CaptchaTextBoxLabel="Enter code as displayed in the image: (Case Sensitive)" Display="Dynamic" ProtectionMode="Captcha">
                                                  
                              </Telerik:RadCaptcha>
                         </td>
                         <td style="color:Red;"></td>
                    </tr>
               </table>
       </div>
       <!-- Buttons-->
       <div>
              <table>
                    <tr>
                         <td class="label"></td>
                         <td><Telerik:RadButton ID="btnSendmsg" runat="server" CausesValidation="true" OnClick="btnSendmsg_Click" Text="Send"></Telerik:RadButton></td>
                         <td></td>
                   </tr>
              </table>
       </div>
   </div
   <!-- Validation Summary-->
   <div style="width:300px;height:300px;">
        <asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableClientScript="False" />
  </div>
</asp:Panel>
    public partial class SendEmailToFacultyUserControl : UserControl
    {
        StringDictionary headers = new StringDictionary();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack) {
                if (Page.Request.QueryString["Id"] != null)  {
                    // headers.Add("to", "ronak@art-sci.udel.edu");
                    txtBody.Text = Page.Request.QueryString["Id"].ToString();
                
            }
        }
  
        protected void btnSendmsg_Click(object sender, EventArgs e)
        {
            if (Page.IsValid) { 
  
                SPWeb web = SPContext.Current.Web;
                bool send = false;
                headers.Add("from", txtEmail.Text);
                headers.Add("to", ronak@domain.com);
                headers.Add("subject", txtSubject.Text);
                headers.Add("content-type", "text/html");
                SPSecurity.RunWithElevatedPrivileges(delegate()
                {
                    send = SPUtility.SendEmail(web, headers, txtBody.Text);
  
                });
                this.Page.Response.Clear();
                this.Page.Response.Write(string.Format(CultureInfo.InvariantCulture, "<script type=\"text/javascript\">window.frameElement.commonModalDialogClose(1,'{0}');</script>", Convert.ToInt32(send)));
                this.Page.Response.End();
                //ScriptManager.RegisterStartupScript(this, GetType(), "CallBack", string.Format(CultureInfo.InvariantCulture, "sendmsg_modalDialogClosedCallback(1,'{0}');</script>", Convert.ToInt32(send)), true);
            }
       }
    }
}
Please advise me

Tsvetoslav
Telerik team
 answered on 07 Dec 2010
2 answers
69 views
Please,send me a simple project of RadSchedular Advance Form that using SQL Server i'm first time uses the telerik radschedular.
your schedular advance template demo is in XML see it.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/advancedformtemplate/defaultcs.aspx
I want same thing but in SQL Server not in XML
Veronica
Telerik team
 answered on 07 Dec 2010
2 answers
133 views
I have a RadTreeView in my user control (.ascx) like this:

<telerik:RadTreeView ID="myTreeView" CheckBoxes="true"  
PersistLoadOnDemandNodes="true" TriStateCheckBoxes="true" runat="server"
CheckChildNodes="true" CausesValidation="false"
OnNodeExpand="treeView_NodeExpand">

    <CollapseAnimation Type="OutQuint" Duration="100" />
    <ExpandAnimation Duration="100" />  
</telerik:RadTreeView><BR>

It's been working fine but lately I notice when I click on the expand(+) button it take about more than 5 seconds to hit the break point I have on the 1st line of code in my handler(treeView_NodeExpand). What could be the culprit here? What is going on in between the click and hitting the break point?
Nikolay Tsenkov
Telerik team
 answered on 07 Dec 2010
1 answer
46 views
I am using Visual Studio 2008 and NET Framework 3.5. I have an ASPX page with a RadTreeView.

With Chrome, everything works like a charm. With IE 7.0, it gives JavaScript errors

Any Idea?

Thanks in advance

Javier Rojas .



Nikolay Tsenkov
Telerik team
 answered on 07 Dec 2010
2 answers
148 views
Hi, I need your help with this bug. Here is what I did,

I've a Radgrid (Q1 2010) without any Ajax enabled. And, I've implemented a sorting row function to re-order the items, in which user needs to select a row, and click on a custom-made "Move Up/Down" button located above the RadGrid. Everything is working until I've noticed that, after the sorting is done and I click on the "Edit" button to make some changes to the record. RadGrid picked the wrong record in the Edit mode.

In the HTML source code, I've seen that RadGrid has generated the id of "tr" in order such as,

<tr id="ctl00_ctl00_ContentPlaceHolderBase_ContentPlaceHolder1_RadGrid1_ctl00__0"...
...
<tr id="ctl00_ctl00_ContentPlaceHolderBase_ContentPlaceHolder1_RadGrid1_ctl00__1"...
...
<tr id="ctl00_ctl00_ContentPlaceHolderBase_ContentPlaceHolder1_RadGrid1_ctl00__2"...
...
With my sorting function, the order is messed up. Is it because of that? If so, what is the best way to fix this?

Thanks.
Veli
Telerik team
 answered on 07 Dec 2010
3 answers
73 views
Hi,

on my data records pages i'm doing all functionality from client side, i want to dynamically rebind my radtreeview on radgrid client side row selected event.how can i implement this functionality client side?
Nikolay Tsenkov
Telerik team
 answered on 07 Dec 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?