Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
208 views
Hi all,

protected void btnSignUp_Click(object sender, EventArgs e)
        {
            try
            {
                
                string guid = System.Guid.NewGuid().ToString();
                System.Guid g = new Guid(guid);
                string txtName = (fvwSignUp.Row.FindControl("txtName") as TextBox).Text;
                string txtEmail = (fvwSignUp.Row.FindControl("txtEmail") as TextBox).Text;
                string txtPassword = (fvwSignUp.Row.FindControl("txtPassword") as TextBox).Text;
                string rcbGender = (fvwSignUp.Row.FindControl("rcbGender") as RadComboBox).SelectedValue;
               // DateTime rdpDate = (fvwSignUp.Row.FindControl("rdpDate") as RadDatePicker).SelectedDate;
         
                  
                strConnection = ConfigurationManager.ConnectionStrings["pfms"].ConnectionString;
                dbConn = new SqlConnection(strConnection);
                dbConn.Open();
                SqlCommand da = new SqlCommand("insert into SignUp values(@UserID,@UserName,@Email,@Password,@Gender,@BirthDate)", dbConn);
               da.Parameters.Add("@UserID", SqlDbType.VarChar, 200).Value =guid;
                da.Parameters.Add("@UserName", SqlDbType.VarChar).Value = txtName;
                da.Parameters.Add("@Email", SqlDbType.VarChar).Value = txtEmail;
                da.Parameters.Add("@Password", SqlDbType.VarChar).Value = txtPassword;
                da.Parameters.Add("@Gender", SqlDbType.Int).Value = rcbGender;
                SqlParameter p1 = da.Parameters.Add("@BirthDate", SqlDbType.DateTime);
                p1.Value = rdpDate.Value;
               // DateTime dMyDate = rdpDate.Value;
  
                da.ExecuteNonQuery();
                fvwSignUp.ChangeMode(FormViewMode.ReadOnly);
                 
            }
  
            finally
            {
  
                if (dbConn != null)
                {
                    dbConn.Close();
                    bindData();
                }
            }
 I have an error msg show that:-
Error 5 The name 'rdpDate' does not exist in the current context 

if i declare this radDatePicker, another error msg will display which is:-

Error 5 'System.DateTime' does not contain a definition for 'Value' and no extension method 'Value' accepting a first argument of type 'System.DateTime' could be found (are you missing a using directive or an assembly reference?) 


Any help is appreciated....

Best regards,
Nasri
Arteta Sam
Top achievements
Rank 1
 answered on 23 Nov 2010
2 answers
83 views
I have 2 RadTextBox controls that I want to flow one after the other on a page if there is room.  They work correctly until I ajaxify them, then they line up, the second one below the first (even though there is room on the page for them to be side by side.
The only difference I see in the HTML code as it runs is that the ajaxified controls are each wrapped with an additional <div >.

 

<telerik:RadTextBox ID="rtbIncidentStartTime" runat="server" ReadOnly="true" BackColor="#F8F8F8" Label="Incident Start Time" Width="310px">

 

 

</telerik:RadTextBox>&nbsp&nbsp

 

 

<telerik:RadTextBox ID="rtbIncidentRestoreTime" runat="server" ReadOnly="true" BackColor="#F8F8F8" Label="Incident Restore Time" Width="310px">

 

 

</telerik:RadTextBox><br />

How do I get the ajaxified controls to behave like the non-ajaxified  version?

 

Michael
Top achievements
Rank 1
 answered on 22 Nov 2010
1 answer
121 views
I have a button that uploads the selected file through RadInput.  However, if the user clicks it and the selected file input is blank it errors.  How can I check whether the RadInput is blank or null so I can send a custom error. Or can I hook it up to a validator? 
STEPHEN
Top achievements
Rank 1
 answered on 22 Nov 2010
6 answers
298 views
Hi,

I using master page. Without master page all the page working fine. But when i use master page following error comming

Unknown server tag 'telerik:RadScriptManager'.

<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
here is my master page

<%@ Master Language="C#" AutoEventWireup="true" CodeFile="UsanMaster.master.cs" Inherits="UsanMaster" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register  namespace="Telerik.Web.UI" tagprefix="telerik" assembly="Telerik.Web.UI"  %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<style type="text/css">
body {
    BACKGROUND-IMAGE: url(images/gradient.png); BACKGROUND-COLOR: #e6e6e6; MARGIN: 0px; BACKGROUND-REPEAT: repeat-x; FONT-FAMILY: Arial, Helvetica, sans-serif; FONT-SIZE: 11px
}

</style>

    <title>MDR Database :: Total USAN Project</title>
    <asp:ContentPlaceHolder id="head" runat="server">
    </asp:ContentPlaceHolder>



</head>
<body>
    <form id="form1" runat="server">
    
    <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
    </telerik:RadScriptManager>   

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


Here is my details page

<%@ Page Title="MDR Database :: Total USAN Project - CTR Lookup Data" Language="C#" MasterPageFile="~/Cam/Usan/UsanMaster.master" AutoEventWireup="true" CodeFile="Ctr.aspx.cs" Inherits="Cam_Usan_Ctr" %>
<%@ Register  namespace="Telerik.Web.UI" tagprefix="telerik" assembly="Telerik.Web.UI" %>

<%@ MasterType VirtualPath="~/Cam/Usan/UsanMaster.master" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



Where is the problem?

lakmal















Saut
Top achievements
Rank 1
 answered on 22 Nov 2010
1 answer
685 views
Hi,

I am using the AJAX RadChart, and because of the small pie slices the labels are being overlapped. 
1. How do I change the series item label style to smaller font and different font family and color.
2. When I am setting IntelligentLabelsEnabled=true, the labels are going off of the plot area, only part of the label is being visible. How to avoid labels going off of the plot area.

Thanks
Leela
Evgenia
Telerik team
 answered on 22 Nov 2010
1 answer
135 views
Hi ,
I am not sure if the Tree list support a Context Menu function?
If yes could you please provide me a link to an example.

Thanks in advance

Tejas
Veli
Telerik team
 answered on 22 Nov 2010
1 answer
77 views
hai sir,

   i have started using telerik reporting in our website , when we bind an image  to a picture box ,in case the image is missing ,the error is shown as
 "An error has occurred while processing PictureBox 'pictureBox1':
Could not find file '\\jitserver\digitalfilesfmsdemo\buyimgpath\AKM-INO00107-6136-1.JPG'."
on the picture box, it does not look nice when the report is generated.
         please give me a solution where when the binding is not found , how to show an alternative image which says no image found.
Steve
Telerik team
 answered on 22 Nov 2010
1 answer
201 views
Hi all,

Does anyone know if there is an easy way to change the font name and size for all RadControls using CSS? I.e. without having to set the property on each of controls?

Jon
Dimo
Telerik team
 answered on 22 Nov 2010
1 answer
457 views
Hi there,

I'm bit new to telerik controls.

I need to achieve functionality of toggling the visibility of a table in <itemTemplate> column, normally table should be hidden but when we mouseover on the row the edit options table should appear.

below is the code and i've commented the section i need to toggle on mouseover
-----------------------------code------------------------------------------
  <telerik:GridTemplateColumn>            
                               <ItemTemplate>               
                 <table align="left" border="0" cellpadding="0" cellspacing="0" >
                                    <tr>
                                        <td id="tddetails" runat="server" valign="middle" align="center" width="5%">
                                            <asp:CheckBox ID="CheckBoxAssetID"  runat="server" style="display:none;"/>
                                           <input id="grdRdo" name="grdRdo" type="radio" runat="server" disabled="disabled" visible="false"  value='<%# Eval("DocumentID") %>' onclick="fnCheckUnCheck(this.id);" /> 
                                         
                                            <asp:Label ID="LabelAssetID" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "AssetID")%>'></asp:Label>
                                            <asp:Label ID="LabelAssetName" runat="server" Visible="false" Text='<%# DataBinder.Eval(Container.DataItem, "Name")%>'></asp:Label>
                                 
                </td>
                                        <td width="22%" align="center">
                                            <asp:Image ID="ImagePreview" runat="server" lowsrc="../images/COMMON/BUTTONS/wait20.gif"
                                                AlternateText="&nbsp;&nbsp;&nbsp;" CssClass="myassetsimg" />
                                        </td>
                                        <td width="47%">
                                            <table width="170" cellpadding="0" cellspacing="0" align="left">
                                                <tr>
                                                    <td align="left">
                                                        <asp:Label ID="LabelDescription" runat="server" CssClass="myassets_description"></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td valign="middle" width="35%" align="left">
      <!-- Need to toggle this table "tblCMenu" on mouseover-->
                                            <table name="tblCMenu" id="tblCMenu" runat="server"  cellpadding="0" cellspacing="0" border="0"  >
                                                <tr >
                                                    <td width="40" valign="middle" align="center">
                                                        <asp:Literal ID="litPreview" runat="server" Text="" Visible="false"> </asp:Literal>
                                                        <asp:ImageButton ID="btnFlodocs" runat="server" AlternateText="preview1" ImageUrl=""
                                                            OnClick="btnFlodocs_Click" CausesValidation="false"  Visible="false" />
                                                    </td>
                                                    <td width="40" valign="middle" align="center">
                                                        <asp:ImageButton ID="btnRename" CssClass="imageButton" AlternateText="Rename" runat="server" SkinID="btnLibPencil"
                                                            OnClick="btnRename_Click" CausesValidation="false"
                                                            ToolTip="rename" />
                                                    </td>
                                                      <td  valign="middle" align="center">
                                                        <asp:ImageButton ID="imgDuplicate1" AlternateText="Duplicate" CssClass="imageButton" runat="server" CausesValidation="false" SkinID="btnLibCopy"
                                                            ToolTip="duplicate" Visible="false" OnClick="imgDuplicate_Click" />
                                                    </td>
                                                 
                                                  
                                                    <td width="40" valign="middle" align="center">
                                                        <asp:ImageButton ID="btnDelete" AlternateText="Delete" CssClass="imageButton" runat="server"
                                                            SkinID="btnLibDelete" CausesValidation="false"
                                                            ToolTip="delete" />
                                                    </td>
                                                    <td width="25" valign="middle" align="center">
                                                    <asp:Image ID="imgChecked" runat="server" Visible="false" ToolTip="checked" ImageUrl="/images/COMMON/BUTTONS/25x25CheckMark.gif" />
                                                    </td>
                                                </tr>
                                               <tr ><td>&nbsp;</td>
                                                    <td align="right">
                                                        
                                                           <asp:Label ID="lblQty" runat="server" Visible="false" CssClass="myassets_description" style="text-align:center;" Text="qty:"></asp:Label>&nbsp;
                                                    </td>
                                                     <td  valign="bottom" align="center">
                                                  
                                                        <asp:TextBox ID="txtQty" style="height:17px; color:Black; font-size:14px; padding-right:1px; padding-left:0; padding-bottom:0; padding-top:0; text-align:right;" runat="server" Visible="false"  MaxLength="5" Width="35"></asp:TextBox>
                                                    </td>  
                                                       <td  valign="middle" align="center">
                                                        <asp:ImageButton ID="imgAddToCart1" AlternateText="Add to cart" CssClass="imageButton" runat="server" style="padding-top:6px;"
                                                          CausesValidation="false" SkinID="btnLibCart"
                                                            ToolTip="add to cart" Visible="false"  />
                                                    </td>  
                                                </tr>
                                            </table>
<!--- Till Here  -->
                                        </td>
                                    </tr>                                  
                                </table>                               
                </ItemTemplate>               
</telerik:GridTemplateColumn>
------------------------------------------------------

I hope i can get some constructive solution for this from your side.
One Ques : Is it possible to use dragdrop feature for grid using <itemTemplate> ?

Thanks Aman
Dimo
Telerik team
 answered on 22 Nov 2010
1 answer
130 views
In my datasource, there are some columns that I get back that I don't wish to display.  I know you can change the column attributes to hide a column, but in this case with a pivot table the column would now be a row that would have to hide.  How do I go about doing something like that, is it even possible?
Radoslav
Telerik team
 answered on 22 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?