Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
261 views
Please help.

I receive the following error when adding an exception to the recurrence:

Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
   Telerik.Web.UI.RecurrenceRule.TryParse(String input, RecurrenceRule& rrule) +970
   Telerik.Web.UI.Scheduling.AppointmentController.ExpandRecurrence(Appointment parent) +145
   Telerik.Web.UI.Scheduling.AppointmentController.AddAppointmentAndExpand(Appointment appointment) +16
   Telerik.Web.UI.RadScheduler.PerformDataBindingFromProvider(IEnumerable`1 providedAppointments) +127
   Telerik.Web.UI.RadScheduler.PerformSelect() +156
   System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +73
   System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
   Telerik.Web.UI.RadScheduler.EnsureDataBound() +12
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +63
   Telerik.Web.UI.RadScheduler.CreateChildControls() +10
   System.Web.UI.Control.EnsureChildControls() +87
   System.Web.UI.Control.PreRenderRecursiveInternal() +44
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Control.PreRenderRecursiveInternal() +171
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842

RadScheduler front-end: (I have the datarecurrenceparentkeyfield set as "MasterSeriesItemID")
<telerik:RadScheduler runat="server" ID="RadScheduler1" 
    width="700px" height="565px"
    Skin="Office2007" 
    overflowbehavior="Scroll" shownavigationpane="true"
    timezoneoffset="00:00:00" selectedview="MonthView"
    daystarttime="08:00:00" dayendtime="20:29:59" 
    datasourceid="Appointments_DS" 
    datakeyfield="Key" datastartfield="EventDate"
    dataendfield="EndDate" datasubjectfield="Title" 
    datarecurrencefield="RecurrenceRule" 

    datarecurrenceparentkeyfield="MasterSeriesItemID"

    customattributenames="Description, Category, Location, Event_Cancelled, RecurrenceData"
    allowdelete="false" allowedit="false" allowinsert="false" showviewtabs="true">
    <monthview userselectable="true" visibleappointmentsperday="2" />
    <TimelineView UserSelectable="false" />
    <appointmenttemplate>
        <asp:literal id="ApptBtn" runat="server" 
            text='<%# (Eval("Subject").ToString().Length >= 16) 
            ? Eval("Subject").ToString().Substring(0, Eval("Subject").ToString().IndexOf(" ")) + "..." 
            : Eval("Subject") %>'></asp:literal>
    </appointmenttemplate>
</telerik:RadScheduler>


Sample data:
<Appointment>
  <Key>171</Key>
  <Title>Policy Committee</Title>
  <Location>Room 100 (55 Somewhere Street)</Location>
  <EventDate>2011-01-01T10:30:00</EventDate>
  <StartDateString>1/1/2011</StartDateString>
  <EndDate>2094-03-04T10:30:00</EndDate>
  <Description>Meeting Description</Description>
  <Category>Committee Meeting</Category>
  <Event_Cancelled>0</Event_Cancelled>
  <fRecurrence>1</fRecurrence>
  <RecurrenceData><recurrence><rule><firstDayOfWeek>su</firstDayOfWeek><repeat><monthlyByDay th="TRUE" weekdayOfMonth="first" monthFrequency="1" /></repeat><repeatForever>FALSE</repeatForever></rule></recurrence></RecurrenceData>
  <RecurrenceRule>
    <![CDATA[
        DTSTART:20110101T103000Z
        DTEND:20110101T103000Z
        RRULE:FREQ=MONTHLY;UNTIL=20940304T103000Z;INTERVAL=1;BYSETPOS=1;BYDAY=TH;
    ]]>
</RecurrenceRule>
  <fAllDayEvent>0</fAllDayEvent>
  <EventType>1</EventType>
  <Modified>2010-12-03T13:13:06</Modified>
</Appointment>
<Appointment>
  <Key>172</Key>
  <Title>Policy Committee</Title>
  <Location>Room 100 (55 Somewhere Street)</Location>
  <EventDate>2011-12-01T10:30:00</EventDate>
  <StartDateString>12/1/2011</StartDateString>
  <EndDate>2011-12-01T10:30:00</EndDate>
  <Description>Meeting Description</Description>
  <Category>Committee Meeting</Category>
  <Event_Cancelled>1</Event_Cancelled>
  <fRecurrence>1</fRecurrence>
  <RecurrenceData>Every 1 month(s) on the first Thursday</RecurrenceData>
  <RecurrenceRule>
    <![CDATA[
        DTSTART:20111201T103000Z
        DTEND:20111201T103000Z
        RRULE:UNTIL=20111201T103000Z;BYSETPOS=-1;
    ]]>
</RecurrenceRule>
  <fAllDayEvent>0</fAllDayEvent>
  <EventType>4</EventType>
  <RecurrenceID>2011-12-01T10:30:00</RecurrenceID>
  <MasterSeriesItemID>171</MasterSeriesItemID>
  <Modified>2010-12-03T14:41:34</Modified>
</Appointment>


XSL file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="Appointments">
        <Appointments>
            <xsl:apply-templates select="Appointment"/>
        </Appointments>
    </xsl:template>
  
    <xsl:template match="Appointment">
        <Appointment>
            <xsl:attribute name="Key">
                <xsl:value-of select="Key"/>
            </xsl:attribute>

            <xsl:attribute name="MasterSeriesItemID">
                <xsl:value-of select="MasterSeriesItemID"/>
            </xsl:attribute>

            <xsl:attribute name="Title">
                <xsl:value-of select="Title"/>
            </xsl:attribute>
            <xsl:attribute name="EventDate">
                <xsl:value-of select="EventDate"/>
            </xsl:attribute>
            <xsl:attribute name="EndDate">
                <xsl:value-of select="EndDate"/>
            </xsl:attribute>
            <xsl:attribute name="Category">
                <xsl:value-of select="Category"/>
            </xsl:attribute>
            <xsl:attribute name="Location">
                <xsl:value-of select="Location"/>
            </xsl:attribute>
            <xsl:attribute name="Description">
                <xsl:value-of select="Description"/>
            </xsl:attribute>
            <xsl:attribute name="Event_Cancelled">
                <xsl:value-of select="Event_Cancelled"/>
            </xsl:attribute>
            <xsl:attribute name="RecurrenceData">
                <xsl:value-of select="RecurrenceData"/>
            </xsl:attribute>
            <xsl:attribute name="RecurrenceRule">
                <xsl:value-of select="RecurrenceRule"/>
            </xsl:attribute>
        </Appointment>
    </xsl:template>
</xsl:stylesheet>
Simon
Telerik team
 answered on 21 Dec 2010
1 answer
82 views
I'm kind of surprised that Telerik has not come out with a server-side animation control, like the existing AjaxControlToolkit's Animation Extender (but more functional and easier to implement). There are other alternatives, like RIAnimation (http://www.hushhushmedia.com/page/RIAnimation.aspx) but that is clearly no longer supported. This would be for those of us who want high quality jquery animations, but don't want to bother with javascript!
Sebastian
Telerik team
 answered on 21 Dec 2010
1 answer
92 views
Hi,

Is it possible to control what appears in the "Files of type" combo in the "Choose file to upload" dialog?
If I want to upload just .xyz files then I possible want just .xyz to appear in the "Files of type" combo.
But I guess it's not possible?

Regards,
Peter
Genady Sergeev
Telerik team
 answered on 21 Dec 2010
1 answer
155 views
Hello,
         I have a RadAsyncUpload control inside UpdatePanel(AJAX). When I upload the file, the upload never completes. I tried with the latest 2010 version. I still cant upload the file when RadAsyncUpload is insde the UpdatePanel. If I remove the UpdatePanel, then I m able to upload the file, but the entire screen refreshes, which is what I want to avoid.


Thanks,
Bharani
Genady Sergeev
Telerik team
 answered on 21 Dec 2010
4 answers
253 views
There are several examples to enable Dynamic Data support on a gridview without using the full Dynamic Data scaffolding (global.asax + dynamicdata folder) such as on this video

I followed along with the example as shown in the video and I was able to get gridview to work correctly with dynamic support.

However, the same steps do not work with DynamicRadGrid. I get the error:
Could not determine a MetaTable. A MetaTable could not be determined for the data source 'EntityDataSource1' and one could not be inferred from the request URL. Make sure that the table is mapped to the dats source, or that the data source is configured with a valid context type and table name, or that the request is part of a registered DynamicDataRoute.

Here are steps I took:
1. In the Page_Init:
RadGrid1.EnableDynamicData(typeof(Plan));
2. Made a MetaData Class:
[MetadataType(typeof(PlanMD))]
    public partial class Plan
    {
        public class PlanMD
        {
            [StringLength(50), Required]
            public string Name { get; set; }
        }
    }
3. Added a validation summry on the page
4. Add a dynamicradgrid on the page with DynamicColumn
<dynamic:DynamicRadGrid ID="RadGrid1" runat="server" AllowAutomaticInserts="True"
            AllowAutomaticUpdates="True" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
            AutoGenerateDeleteColumn="True" AutoGenerateEditColumn="True" DataSourceID="EntityDataSource1"
            GridLines="None">
            <MasterTableView AllowAutomaticInserts="False" CommandItemDisplay="Top" DataKeyNames="Id"
                DataSourceID="EntityDataSource1">
                <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
                <RowIndicatorColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </RowIndicatorColumn>
                <ExpandCollapseColumn>
                    <HeaderStyle Width="20px"></HeaderStyle>
                </ExpandCollapseColumn>
                <Columns>
                    <dynamic:DynamicGridBoundColumn DataField="Name" HeaderText="Name" UniqueName="Name">
                    </dynamic:DynamicGridBoundColumn>
  
                </Columns>
            </MasterTableView>
        </dynamic:DynamicRadGrid>


Please advise if DynamicRadgrid is even designed to work in this scenario. Thanks
Radoslav
Telerik team
 answered on 21 Dec 2010
3 answers
444 views
Hello, having some issues with having a TextBox in an ItemTemplate.

First it was the text box not accepting "space" but i found the workaround in the forums.
http://www.telerik.com/help/aspnet-ajax/listbox-space-ignored-textbox-itemtemplate.html

Now, typing text into the textboxes creates unwanted behavior when using the "s" character. The behavior im seeing is when typing the "s" charater in the RadListBoxItem.Textbox the selection attempts a changes to the next visible list box item. the focus bounces back and forth between the visible items (I only have 2 items visible at any given time due to size contraints.). I've looked high and low on a way to disable the listbox keyboard shortcuts but found nothing.

Im unsure how many other keyboard shortcuts are associated with this control, but since i need a textbox (well, a couple) I'd like to simply turn off keyboard support for this control.

Heres the markup:

 

<telerik:RadListBox runat="server" ID="listBoxSlideShowActiveItems" 
    SelectionMode="Multiple" EnableDragAndDrop="true" 
    AllowDelete="false" AllowReorder="true" Height="200px" Width="370px" AllowTransferOnDoubleClick="false">
    <ItemTemplate>  
        <fieldset>
            <legend style="font-size:8pt;padding-bottom:2px;">Slide Description</legend>
            <table border="0" width="100%">
                <tr>
                    <td style="width:80px;" valign="top">
                        <asp:Image ID="imageActiveItemThumbnail" runat="server" CssClass="thumbnailImageSlideShowLarge" ImageUrl="~/SiteImages/spacer.gif" />
                    </td>
                    <td valign="top">
                        <table border="0" width="100%">
                            <tr>
                                <td>Text:</td>
                                <td><asp:TextBox ID="textActiveItemText" runat="server" Width="170"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>Href</td>
                                <td><asp:TextBox ID="textActiveItemHref" runat="server" Width="170"></asp:TextBox></td>
                            </tr>
                            <tr>
                                <td>Target:</td>
                                <td>
                                    <telerik:RadComboBox ID="comboActiveItemTarget" runat="server" Width="178px">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="_blank" Value="_blank" Selected="True" />
                                            <telerik:RadComboBoxItem Text="_parent" Value="_parent" />
                                            <telerik:RadComboBoxItem Text="_search" Value="_search" />
                                            <telerik:RadComboBoxItem Text="_self" Value="_self" />
                                            <telerik:RadComboBoxItem Text="_top" Value="_top" />
                                        </Items>
                                    </telerik:RadComboBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
        </fieldset>
    </ItemTemplate>
    <Items></Items>
</telerik:RadListBox>
<script type="text/javascript">
    // RadListBox documented workaround for textbox in item template
  
    var radListBoxKeyDown = Telerik.Web.UI.RadListBox.prototype._onKeyDown;
    Telerik.Web.UI.RadListBox.prototype._onKeyDown = function (e) {
        if (e.keyCode == Sys.UI.Key.space) {
            return;
        }
        else {
            radListBoxKeyDown.apply(this, arguments);
        }
    }
</script>

Thanks in advance!

Genady Sergeev
Telerik team
 answered on 21 Dec 2010
3 answers
175 views
Hi,

    I use RadEditor inside ModalpopUpExtender in our Project.. I use ImageManager Tool in RadEditor.. When i click on the Image Manager tool, its dialog window gets opened behind Rad Editor..
<telerik:RadEditor ID="radEditorDescription" NewLineBr="false" EnableResize="false"
                                                            runat="server" Width="620px" TabIndex="29" CssClass="maarginleft20 marginBottom20">
                                                            <Tools>
                                                                <telerik:EditorToolGroup Tag="MainToolbar">
                                                                    <%--<telerik:EditorTool Name="AjaxSpellCheck" />--%>
                                                                    <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F" />
                                                                    <telerik:EditorTool Name="Undo" ShortCut="CTRL+Z" />
                                                                    <telerik:EditorTool Name="Redo" ShortCut="CTRL+Y" />
                                                                    <telerik:EditorTool Name="Indent" />
                                                                    <telerik:EditorTool Name="Outdent" />
                                                                    <telerik:EditorTool Name="TableWizard" />
                                                                    <telerik:EditorTool Name="InsertSymbol" />
                                                                    <telerik:EditorTool Name="JustifyLeft" />
                                                                    <telerik:EditorTool Name="JustifyRight" />
                                                                    <telerik:EditorTool Name="JustifyFull" />
                                                                </telerik:EditorToolGroup>
                                                                <telerik:EditorToolGroup Tag="FileManagers">
                                                                    <telerik:EditorTool Name="ImageManager" />
                                                                </telerik:EditorToolGroup>
                                                                <telerik:EditorToolGroup>
                                                                    <telerik:EditorTool Name="Bold" />
                                                                    <telerik:EditorTool Name="Italic" />
                                                                    <telerik:EditorTool Name="Underline" />
                                                                    <telerik:EditorSeparator />
                                                                    <telerik:EditorTool Name="ForeColor" />
                                                                    <telerik:EditorTool Name="BackColor" />
                                                                    <telerik:EditorSeparator />
                                                                    <telerik:EditorTool Name="FontName" />
                                                                    <telerik:EditorTool Name="RealFontSize" />
                                                                </telerik:EditorToolGroup>
                                                            </Tools>
                                                            <CssFiles>
                                                                <telerik:EditorCssFile Value="~/App_Themes/Web20/Editor.css" />
                                                            </CssFiles>
                                                        </telerik:RadEditor>
  
  
  
<ajaxToolkit:ModalPopupExtender ID="ModalPopupSwitchUserMenu" runat="server" TargetControlID="linkButtonDesc"
                                            PopupControlID="EditorPanel" BackgroundCssClass="watermarked" BehaviorID="SwitchUserMenuPopup"
                                            X="200" Y="50" RepositionMode="RepositionOnWindowResize" Drag="true" PopupDragHandleControlID="MyOptionsTitleBar"
                                            CancelControlID="ImageButtonClose" OkControlID="ImageButton1" />
Please Guide me..
Rumen
Telerik team
 answered on 21 Dec 2010
1 answer
155 views
Why is there an ItemInsert event and an ItemCommand event? Why not case out all the CRUD events in the ItemCommand event? Does it have something to do with having AllowAutomaticInserts turned on?

Are these events where I should get the values from my EditFormTemplate controls and assign them to the Update/Delete/Insert parameters of my ObjectDataSource?

I'm a newbie, obviously. Sorry for all the questions at once.
Princy
Top achievements
Rank 2
 answered on 21 Dec 2010
0 answers
154 views
I need to be able to select the null value to a RadComboBox bind to an EntityDataSource,

in WPF
there is a ClearSelectionButtonVisibility, what is the alternative in ASP.NET AJAX? without doing it manually

thanks in advance
Alberto
Top achievements
Rank 1
 asked on 21 Dec 2010
1 answer
64 views
i am using radtreeview in my page. while double clicking the tree node i want to open the rad window. before that i want  to  display ajax loading panel.
how can i do this. help me.
thanks .
priya.
Shinu
Top achievements
Rank 2
 answered on 21 Dec 2010
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?