Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
117 views
Hello,

I am using RadScheduler in my application and I would like to set the default layout of the AdvancedInsertTemplate so that 'Recurring appointment' is selected with a recurrence setting of 'Weekly'.  Is this possible to do without having to modify the .ascx file in some way?  I have been successful in programmatically selecting the 'Recurring appointment' checkbox in the FormCreated event using the following code:

Dim chk As CheckBox = CType(e.Container.FindControl("RecurrentAppointment"), CheckBox)  
chk.Checked = True 

but this only causes the checkbox to be checked, the panel below that displays the recurrence controls won't show.  Even if I try:

Dim pnl As Panel = CType(e.Container.FindControl("RecurrencePatternPanel"), Panel)  
pnl.Visible = True 

Does anyone know what I might be able to do to accomplish this?

Thanks
Glenn Boothe
Top achievements
Rank 1
 answered on 03 Feb 2009
3 answers
158 views
Hi there,

So here's my situation:

I'm dynamically adding RadDocks on the server-side, and for each RadDock I create, I set its OnClientInitialize property to a JS function as shown in the examples so that I can use an image as the drag handle.  The RadDocks are inside a RadAjaxPanel, and I'm forcing an update of the panel through javascript.  Everything renders properly, but I've lost the ability to drag and drop my docks.  I've put in a couple of alerts and it seems that after the Ajax postback, the OnClientInitialize isn't being called.

Any help would be greatly appreciated.

Thanks!
Obi-Wan Kenobi
Top achievements
Rank 1
 answered on 03 Feb 2009
4 answers
137 views
I am using some user controls(email to friend and reminder etc) inside rad rotator.These user controls uses Radtooltip.The problem is when these controls used outside the Rotator the tooltip works fine but when they are used inside the rotator , the tooltip restrainted inside rotator and does'nt showup completely.Is there any way that tooltip will show normally while using inside rotator.

Thanks
RobDob
Top achievements
Rank 1
 answered on 03 Feb 2009
1 answer
65 views
Can I get detail controls without traversing on the nested items. Like from griddata item.

GridItem

[] nestedViewItems = tableView.GetItems(GridItemType.NestedView); 

 

 

 

foreach (GridNestedViewItem nestedViewItem in nestedViewItems)  

{

    string strKey = tableView.Items[i].GetDataKeyValue("ADGuid").ToString();  

 

 

 

    if (Key_ID == strKey)  

    {

        gEDR_View = (

RadGrid)nestedViewItem.FindControl("grdEDR_View");  

 

 

        gEDR_View.Visible =

true; 

 

 

    }
}

 

 

 

Yavor
Telerik team
 answered on 03 Feb 2009
1 answer
117 views
We are getting this error when someone clicks on the asp:hyperlink in the datalist below:

this.get_linkElement() is null

<telerik:RadPanelBar ID="pbarUsersGroups" runat="server" Skin="WebBlue" AllowCollapseAllItems="True" CausesValidation="False"
           PersistStateInCookie="True"  >
                <collapseanimation duration="100" type="Linear" />
                    <telerik:RadPanelItem runat="server" Text="Online Users" PostBack="False">
                        <Items>
                            <telerik:RadPanelItem>
                                <ItemTemplate>
                                    <asp:DataList ID="dlOnlineUsers" runat="server" Width="100%" CellPadding="0" CellSpacing="0">
                                        <ItemTemplate>
                                            <asp:HyperLink ID="lnkOpenChatWindow" NavigateUrl='<%# "javascript:openChatWindow(false, \"" + Eval("Bare") + "\");" %>' runat="server" CssClass="rpLink">
                                                <span class="onlineUser"><%# Eval("User") %></span>
                                            </asp:HyperLink>
                                        </ItemTemplate>
                                    </asp:DataList>
                                </ItemTemplate>
                            </telerik:RadPanelItem>
                        </Items>
                 </telerik:RadPanelItem>
                <expandanimation duration="100" type="Linear" />
            </telerik:RadPanelBar>


Can anyone shed some light on why our users would be consistently getting this error when they click on the link?

Thanks

Drew
Yana
Telerik team
 answered on 03 Feb 2009
1 answer
212 views
I was able to create and add RadDocks dynamically to my RadZones. Contents of these dynamically created RadDocks are loaded from ascx files. Those ascx files contain RadGrids in them. I prefer using IDataReader's for the datasources of these RadGrids. However, once everything is rendered, I click "refresh" on a RadGrid and I receive the following error:

System.InvalidOperationException: Invalid attempt to FieldCount when reader is closed.

I get the same error when I click on delete icon for any row of the RadGrids...

I found out that this problem is caused by the fact that the IDataReader, the datasource, is closed once the DataBound event is completed. 

I assign this IDataReader object to the DataSource field of the RadGrid in OnNeedDataSource event. I also created event methods for both DataBinding and DataBound and put some breakpoints to see what the problem is. I saw that once I click on "refresh" on a RadGrid, NeedDataSource, DataBinding and DataBound event methods were called respectively, however, strangely enough, another visit to DataBinding event method is performed (I don't know the source or the reason). This time, the system throws the error I described above because the DataReader is already closed after DataBound event...

What can be the reason for this?

Note: If I use DataTables instead of IDataReaders, everything works fine as expected ;)

Thanks in advance
Petio Petkov
Telerik team
 answered on 03 Feb 2009
0 answers
107 views

Hi,

   I have to use 'ascx' page foruplaoding images as icons and to display in grid and to save to database. Inthis for disabling radajax i have written in javascript. But the problem isthis ascx page is inheriting one BaseControl page. In that some of theconditions are not satisfied by BaseControl page and giving errors. so can yousuggest on it.

   Can i write functionality in C#which disables radajax manager when update button is clicked.

    

Thanks,

Nagarjun S.

nagarjun
Top achievements
Rank 1
 asked on 03 Feb 2009
0 answers
259 views
Hello,

For some reason I cannot get this simple email form to work. The error points to RadComboBox, but I cannot see how to fix it. Please help me, my code is follows:

<%@ Page Language="VB" MasterPageFile="~/oneColumnSlim.master" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="fastquote_Default" title="Untitled Page" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<asp:Content ID="Content1" ContentPlaceHolderID="mid" Runat="Server"
    <asp:Panel runat="server" ID="FastQuoteForm">     
                       <asp:Image ID="Image1" runat="server" ImageUrl="http://www.deloosh.com.au/assets/email.png" CssClass="left" />  
                  <h1>Contact Us</h1> 
            <p>We are here to help. If you have a question about our service or your membership,  
                please fill out the form below and click the submit button.</p> 
                 <p>For an instant answer, please make sure you have checked our <href="../faqs/index.php"
                     Frequently asked Questions</a> (FAQs) section.</p> 
                <table style="width:100%;" cellpadding="5px"
                    <tr> 
                        <td align="right">Title </td> 
                             <td> 
                                 <telerik:RadComboBox ID="Title" runat="server"  
                                     ToolTip="Please enter your title" Skin="WebBlue" Text="Title"  
                                     AutoPostBack="True"
                                     <Items> 
                                         <telerik:RadComboBoxItem runat="server" Text="Mr" Value="Mr" /> 
                                         <telerik:RadComboBoxItem runat="server" Text="Mrs" Value="Mrs" /> 
                                         <telerik:RadComboBoxItem runat="server" Text="Miss" Value="Miss" /> 
                                         <telerik:RadComboBoxItem runat="server" Text="Ms" Value="Ms" /> 
                                         <telerik:RadComboBoxItem runat="server" Text="Dr" Value="Dr" ToolTip="Please give your title" /> 
                                         <telerik:RadComboBoxItem runat="server" Text="Prof" Value="Prof" /> 
                                     </Items> 
                                     <CollapseAnimation Duration="200" Type="OutQuint" /> 
                                 </telerik:RadComboBox> 
                                                  <asp:RequiredFieldValidator 
            ID="RequiredFieldValidator1" runat="server" ControlToValidate="Title"  
            ErrorMessage="You need to give your title" 
            ValidationGroup="MessageGroup">            </asp:RequiredFieldValidator>            </td> 
                    </tr> 
                    <tr> 
                        <td align="right">First name </td> 
                        <td> 
                            <telerik:RadTextBox ID="FirstName" runat="server"
                            </telerik:RadTextBox> <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator9" runat="server" ControlToValidate="Message"  
            ErrorMessage="Please enter your message" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator></td
                        
                    </tr> 
                    <tr> 
                        <td align="right">Last name </td> 
                        <td> 
                             <telerik:RadTextBox ID="LastName" Runat="server" Label="" Rows="10"  
                 Skin="Telerik" ToolTip="Enter your last name"  
                                    Width="250px" Wrap="True">             </telerik:RadTextBox> 
              <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator3" runat="server" ControlToValidate="LastName"  
            ErrorMessage="Please enter your last name" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator> 
            </td> 
                    </tr> 
                    <tr> 
                      <td align="right">Company </td> 
                      <td><telerik:RadTextBox ID="Company" runat="server"
                          </telerik:RadTextBox> <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator2" runat="server" ControlToValidate="Company"  
            ErrorMessage="Please enter your company" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator></td
                    </tr> 
                    <tr> 
                      <td align="right">Telephone </td> 
                      <td><telerik:RadTextBox ID="Telephone" runat="server"
                          </telerik:RadTextBox> <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator4" runat="server" ControlToValidate="Telephone"  
            ErrorMessage="Please enter your telephone number" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator></td
                    </tr> 
                    <tr> 
                      <td align="right">Email </td> 
                      <td><telerik:RadTextBox ID="Email" Runat="server" Label="" Skin="Telerik"  
                 ToolTip="Enter your email" Width="190px"</telerik:RadTextBox>  
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  
                 ErrorMessage="Invalid email address" ControlToValidate="Email"  
                                    ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"  
                                    ValidationGroup="MessageGroup"></asp:RegularExpressionValidator></td
                    </tr> 
                    <tr> 
                      <td align="right">Required Services </td> 
                      <td> 
                          <asp:CheckBoxList ID="Services" runat="server" ToolTip="Choose which services you require"
                              <asp:ListItem>Advanced research design</asp:ListItem> 
                              <asp:ListItem>Survey programming</asp:ListItem> 
                              <asp:ListItem>Survey hosting</asp:ListItem> 
                              <asp:ListItem>Panel respondents</asp:ListItem> 
                              <asp:ListItem>Data analysis</asp:ListItem> 
                          </asp:CheckBoxList> 
                          </td> 
                    </tr> 
                    <tr> 
                      <td align="right">Number of questions </td> 
                      <td><telerik:RadTextBox ID="QuestionNo" runat="server"
                          </telerik:RadTextBox> <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator8" runat="server" ControlToValidate="QuestionNo"  
            ErrorMessage="Please enter the number of questions" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator></td
                    </tr> 
                    <tr> 
                      <td align="right">Number of responses needed </td> 
                      <td><telerik:RadTextBox ID="ResponseNo" runat="server"
                          </telerik:RadTextBox> <asp:RequiredFieldValidator  
            ID="RequiredFieldValidator5" runat="server" ControlToValidate="ResponseNo"  
            ErrorMessage="Please enter the number of responses" 
            ValidationGroup="MessageGroup"></asp:RequiredFieldValidator></td
                    </tr> 
                    <tr> 
                      <td align="right">Target demographic </td> 
                      <td><telerik:RadTextBox ID="Demographic" runat="server"
                          </telerik:RadTextBox>   
            </td> 
                    </tr> 
                    <tr> 
                      <td align="right">Other information </td> 
                      <td><telerik:RadTextBox ID="OtherInfo" runat="server" TextMode="MultiLine"
                          </telerik:RadTextBox> </td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td><telerik:RadTextBox ID="Promo" runat="server"
                          </telerik:RadTextBox> </td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                    <tr> 
                      <td align="right">&nbsp;</td> 
                      <td>&nbsp;</td> 
                    </tr> 
                </table> 
                  
            <br /> 
             <br /> 
             
<asp:ImageButton  
            ID="SendEmail" runat="server" ImageUrl="http://www.deloosh.com.au/assets/red-button-send.jpg" CausesValidation="true" ValidationGroup="MessageGroup" CssClass="rightButton" /> 
              </asp:Panel> 
     
<asp:Panel runat="server" ID="FastQuoteSentForm"
        Your feedback has been sent. If needed, we will respond as soon as we can. Thank  
        you for your interest in AussieThink. 
    </asp:Panel> 
<div class="privacy">  
        <asp:Image ID="Image2" runat="server" ImageUrl="http://www.deloosh.com.au/assets/mail.png" /> 
            style=&quot;width: 63px; height: 41px&quot; /&gt;Corporate: Suite 5, Manchester Lane,  
        Parkville, VIC 3052  
    </div> 
 
 
</asp:Content> 
 
 






aspx.vb file:

Imports System.Net.Mail 
Imports System.Net 
 
Partial Class fastquote_Default 
    Inherits System.Web.UI.Page 
 
    Protected Sub SendEmail_Click(ByVal sender As ObjectByVal e As System.Web.UI.ImageClickEventArgs) Handles SendEmail.Click 
        '!!! UPDATE THIS VALUE TO YOUR EMAIL ADDRESS 
        Const ToAddress As String = "brent.coker@gmail.com" 
 
        '(1) Create the MailMessage instance 
        Dim mm As New MailMessage(Email.Text, ToAddress) 
 
        '(2) Assign the MailMessage's properties 
        mm.Subject = Services.Text 
        mm.IsBodyHtml = True 
        mm.Body = _ 
"<html><head><title>" & _ 
HttpUtility.HtmlEncode(Title.Text) & _ 
"</title></head><body>" & _ 
"<p>" & _ 
HttpUtility.HtmlEncode(FirstName.Text) & "</p>" & _ 
"<p>Employee of the month: " & _ 
HttpUtility.HtmlEncode(LastName.Text) & "</p>" & _ 
"<p>This month's featured event: " & _ 
HttpUtility.HtmlEncode(Company.Text) & "</p>" & _ 
"<p>" & _ 
HttpUtility.HtmlEncode(Telephone.Text) & "</p>" & _ 
"<p>Employee of the month: " & _ 
HttpUtility.HtmlEncode(Email.Text) & "</p>" & _ 
"<p>This month's featured event: " & _ 
HttpUtility.HtmlEncode(Company.Text) & "</p>" & _ 
"<p>" & _ 
HttpUtility.HtmlEncode(Services.Text) & "</p>" & _ 
"<p>Employee of the month: " & _ 
HttpUtility.HtmlEncode(QuestionNo.Text) & "</p>" & _ 
"<p>This month's featured event: " & _ 
HttpUtility.HtmlEncode(ResponseNo.Text) & "</p>" & _ 
"<p>" & _ 
HttpUtility.HtmlEncode(Demographic.Text) & "</p>" & _ 
"<p>Employee of the month: " & _ 
HttpUtility.HtmlEncode(OtherInfo.Text) & "</p>" & _ 
"<p>This month's featured event: " & _ 
HttpUtility.HtmlEncode(Promo.Text) & "</p>" & _ 
"</body></html>" 
 
        '(3) Create the SmtpClient object 
        Dim smtp As New SmtpClient 
 
        '(4) Send the MailMessage (will use the Web.config settings) 
        smtp.Send(mm) 
 
        'Show the EmailSentForm Panel and hide the EmailForm Panel 
        FastQuoteSentForm.Visible = True 
        FastQuoteForm.Visible = False 
    End Sub 
 
    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load 
        If Not Page.IsPostBack Then 
            'On the first page load, hide the EmailSentForm Panel 
            FastQuoteSentForm.Visible = False 
        End If 
    End Sub 
 
 
End Class 
 

Brent
Top achievements
Rank 1
 asked on 03 Feb 2009
7 answers
211 views
Hi!

I'm new in ASP.NET, so excuse me for stupid question, but i really don't understand.
I tried to work with RadSheduler by this tutorial. And everything is ok, but i don't understand, why when i ran an application, it gives me an error "The name 'appointments' does not exist in the current context" =/

Best wishes,
Roman
Roman
Top achievements
Rank 1
 answered on 03 Feb 2009
7 answers
208 views
Hello, i'm using RadToolTip inside a very basic images RadRotator. RadToolTip always appears inside rotator. I've tried to change RadToolTip z-index value but it doesn't fix the problem.

Any tips ?

Thaks

 
Fiko
Telerik team
 answered on 03 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?