Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
47 views
Hi,

I generate a line graph. I do not define the series' color. When the series appears it has a color (presumably just assigned a default/random). I would like to have my series' pointmark be this color.

I tried:

series.Appearance.PointMark.FillStyle.MainColor = series.Appearance.LineSeriesAppearance.Color;

This does not work because the color is still define as ARGB 0,0,0 at the time of PageLoad.

How would I fix this issue?

Evgeni "Zammy" Petrov
Telerik team
 answered on 07 Dec 2010
6 answers
268 views
hello


i am using the radnumeric textbox with spin buttons and dynamic Increment Steps depending on previous user input.
during testing i discovered the following wrong behaviour:

Value of the Textbox set on server: 50
Increment Step: 0.127
after clicking 3 times (numbers vary) the value in the textbox is wrong because it decrements by 0.128.
so it shows the value 49.618 (=50-(2*0.127)-0.128) instead of 49.619 (=50-(3*0.127))
this seems to occur for prime numbers after 0. for example 0.127 or  0.05
when the user then sends the values my custom validations on the server reject the value.

i checked the javascript code for the textbox and as a temporary solution i set the "KeepNotRoundedValue" to true.
the value in the textbox is then wrong but sending and saving to server works. the value is then changed to the correct value.
this auto correct after sending will confuse some users so i need a clean solution.

another question regarding the spin button:
is it possible to customize the behaviour? in my use case i only allow specific values for example:
the value in the textbox is 98 and the step value is set to 5. valid values are 93,88, and so on.
if the user now enters 95 and then uses the decrement spin button it changes the value to 90 which is not allowed.
i would like to set the next valid number when using the spin button or better have some auto-rounding to the next valid number when the value is changed
Radoslav
Telerik team
 answered on 07 Dec 2010
3 answers
167 views
Is there a clean, modular way to do this?

For example, the following code is dangerous because it may erase any existing function that is attached to OnRequestStart:

RadAjaxManager.GetCurrent(Page).ClientEvents.OnRequestStart = "DoSomething";
Maria Ilieva
Telerik team
 answered on 07 Dec 2010
1 answer
138 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
103 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
93 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
79 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
97 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
51 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
115 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?