Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
202 views

I know this topic has come up in a variety of ways, but is there a setting, or a hack to set the height of an appointment to "auto" where it will be big enough to display content specified for an appointment.

I know there is a RowHeight property that can be adjusted to show this, but that's still somewhat sloppy because there is no way of knowing the "biggest" appointment. When using an appointment template below, appointments with a short subject, will become quite large. And there may be a case where an appointment is created with a title that is longer than what is accounted for using the RowHeight property.

        <AppointmentTemplate> 
                <asp:HyperLink ID="hlSubject" runat="server" /><br /> 
                <div><%#CDate(Eval("Start")).ToShortTimeString()%></div>  
        </AppointmentTemplate> 

The rendering of the control with that template is attached.
Peter
Telerik team
 answered on 16 Apr 2012
3 answers
151 views
Hi,

I am having issues with the radscheduler advanced insert form in my radscheduler. What is happening is whenever I double click an empty timeslot to bring up the insert template, whenever I press the enter key in any of the textboxes of the form, I get a javascript error. It seems like the keypress on enter is causing some sort of event to fire and then I get the unhandled exception.


Here is where I am getting the unhandled exception dynamically created by visual studio
/* START Telerik.Web.UI.Common.jQuery.js */
/*! jQuery v1.6.4 http://jquery.com/ | http://jquery.org/license */

g=cu(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c

My Radscheduler control:
 <telerik:RadScheduler runat="server" ID="RadScheduler1"
                    AdvancedForm-EnableCustomAttributeEditing="true"
                    CustomAttributeNames="TimeStart, TimeOut"
                    Height="1200px" Width="100%"
                    ShowFooter="False"
                    SelectedDate="2009-02-02" TimeZoneOffset="03:00:00" DayEndTime="20:00:00"                        
                    FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
                    AppointmentStyleMode="Default"
                    OnNavigationComplete="RadScheduler1_NavigationComplete"
                    OnAppointmentCreated="RadScheduler1_AppointmentCreated"
                    OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete"
                    OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert"
                    DataDescriptionField="Description" DataEndField="End" DataKeyField="ID"
                    DataRecurrenceField="RecurrenceRule"
                    DataRecurrenceParentKeyField="RecurrenceParentID" DataReminderField="Reminder"
                    DataSourceID="SqlDataSource" DataStartField="Start"
                    DataSubjectField="Subject" DayStartTime="06:00:00"
                    WorkDayEndTime="19:00:00" WorkDayStartTime="06:00:00"
                    onformcreated="RadScheduler1_FormCreated"
                    onformcreating="RadScheduler1_FormCreating"
                    StartInsertingInAdvancedForm="True" AllowDelete="False"
                    SelectedView="WeekView" WeekView-GroupingDirection="Horizontal"
                    ColumnWidth="200px"
                    ShowAllDayRow="true" MinutesPerRow="30" GroupingDirection="Vertical">
                    <AdvancedForm Modal="true" />
                    <TimelineView UserSelectable="false" />
                    <ResourceTypes>
                        <telerik:ResourceType AllowMultipleValues="false" DataSourceID="SqlDataSource1"
                            ForeignKeyField="UserID" KeyField="UserID" Name="Users" TextField="UserName" />
                                          
                    </ResourceTypes>
                    <ResourceStyles>
                        <%--AppointmentStyleMode must be explicitly set to Default (see above) otherwise setting BackColor/BorderColor
                        will switch the appointments to Simple rendering (no rounded corners and gradients)--%>
                        
                        <telerik:ResourceStyleMapping Type="Users" Text="ebarcza" ApplyCssClass="rsCategoryRed" />
                        <telerik:ResourceStyleMapping Type="Users" Text="Sean.Kelly" ApplyCssClass="rsCategoryPink" />
                        <telerik:ResourceStyleMapping Type="Users" Text="RandyPurser" ApplyCssClass="rsCategoryOrange" />
                        <telerik:ResourceStyleMapping Type="Users" Text="jSturm" ApplyCssClass="rsCategoryYellow" />
                        <telerik:ResourceStyleMapping Type="Users" Text="tMichel" ApplyCssClass="rsCategoryBlue" />
                        <telerik:ResourceStyleMapping Type="Users" Text="jDuff" ApplyCssClass="rsCategoryGreen" />
                        <telerik:ResourceStyleMapping Type="Users" Text="JennSturm" ApplyCssClass="rsCategoryViolet" />
                        <telerik:ResourceStyleMapping Type="Users" Text="Tentative" BackColor="red"  />
                        <telerik:ResourceStyleMapping Type="Calendar" Text="Work" BackColor="#edd5b7" BorderColor="#cdb597" />
                    </ResourceStyles>
                    <Reminders Enabled="True" />
                    <AppointmentTemplate>
                        <div class="rsAptSubject" style="font-size:9px; height:50px;">
                            <%# Eval("Subject") %>
                        </div>
                    </AppointmentTemplate>

                    <TimeSlotContextMenuSettings EnableDefault="true" />
                                <DayView DayStartTime="06:00:00" WorkDayStartTime="06:00:00"
                        DayEndTime="20:00:00" WorkDayEndTime="20:00:00" />
                    <MonthView AdaptiveRowHeight="True" VisibleAppointmentsPerDay="10" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                  
                </telerik:RadScheduler>

I have been unable to narrow down the cause of this error. Any thoughts??

Thanks,

Brendan
Plamen
Telerik team
 answered on 16 Apr 2012
1 answer
211 views
Hi!

We validate controls on form submit. We are trying to set a tooltip when a required field is missing--it shows up when the user hovers over the control. This works great on an input box but we can't seem to get the date picker to work (see attached.) Below is the relevant code. Any idea how to add a tooltip to the date picker?

Thanks!
<telerik:RadDatePicker ID="radDatePicker" MinDate="1/1/1000" runat="server" Skin="Windows7"
        AutoPostBack="false" EnableViewState="true">
        <Calendar ID="calendarForDatePicker" runat="server" UseRowHeadersAsSelectors="False"
            UseColumnHeadersAsSelectors="False" ViewSelectorText="x" AutoPostBack="false"
            EnableViewState="true">
        </Calendar>
        <DateInput ID="dateInputForDatePicker" runat="server" DisplayDateFormat="M/d/yyyy"
            DateFormat="M/d/yyyy" AutoPostBack="false" CssClass="datePickerBox" EnableViewState="true">
        </DateInput>
        <DatePopupButton ImageUrl="" HoverImageUrl="" EnableViewState="true"></DatePopupButton>
    </telerik:RadDatePicker>
 
 
function isDateInputFieldInError(control, message) {
            var errorState = true;
            var controlRef = $find(control);
            var dateInput = controlRef.get_dateInput();
            if (trimInput(dateInput.get_value()) == "") {
                dateInput._invalid = true;
                addToolTipToControl(document.getElementById(control), message);
                dateInput.get_styles().InvalidStyle[0] += "border: 1px solid #D18185 !important;";
            }
            else {
                dateInput._invalid = false;
                errorState = false;
            }
            dateInput.updateCssClass();
            return errorState;
        }
 
        function isInputFieldInError(control, message) {
            var errorState = true;
            var controlRef = $find(control);
            if (trimInput(controlRef.get_value()) == "") {
                controlRef._invalid = true;
                addToolTipToControl(document.getElementById(control), message);
            }
            else {
                controlRef._invalid = false;
                errorState = false;
            }
            controlRef.updateCssClass();
            return errorState;
        }

Michael O'Flaherty
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
133 views
Hi,

We are switching from a Telerik Treeview to a TreeList in our application.

In the treeview, we also did on-demand loading, there we could catch the OnNodeDataBound event, and if we see that there are no child items for that node, we could hide the expand button. So the user would only see the "+" in front of the nodes that actually have children (even though the children are not sent to the client yet).

I attempted to do the same with the TreeList in the "ItemDataBound" event, but then I got the error that I cannot set the value of the item.CanExpand property. The best I could find is the "HideExpandCollapseButtonIfNoChildren" property, but then the user will still see the "+" in front of all items, and have to click it first to find out that there are no child items, which is not very user friendly.

Is this possible with the treelist? If yes, how?

Kind regards,
Kristof
Richard
Top achievements
Rank 1
 answered on 16 Apr 2012
5 answers
135 views
Hi,
I have a page which is designed with multiple RadPanelBars.its working fine in all aspects except one scenario.

Problem :
If I am in bottom of page, and in Last panel bar,If i do a post back then the page focus will go to first radpanelbar or top of page.

how can I persist the position or focus in bottom of page even after post back

Ex this is what i want

Panel A
********
*
*
*********
Panel B
**********
*
*
**********
Panel C
**********
*
*
**********
Panel D
**********
*
*
**********
Button

As of now when I click on button page focus is going to panel A,even though I was working on Panel D.

I need focus to be in Panel D ,after post back also

Thanks,
A2H
A2H
Top achievements
Rank 1
 answered on 16 Apr 2012
4 answers
106 views
Hi,

I want to set focus to a RadPanelItem from server side.

I have tried the following approach

  RadPanelItem pnlitem1 = (RadPanelItem)TestPanelBar.FindItemByValue("TestPanelItem");
                pnlitem1.Focus();
                pnlitem1.Expanded = true;

But this logic is not working.

Can any one please help me how to set focus to RadPaneltem through server side.

Thanks,
A2H
A2H
Top achievements
Rank 1
 answered on 16 Apr 2012
3 answers
148 views
Good morning all. I was wondering if anyone else has has this problem. I upgraded my Rad AJAX Control dlls and suddenly my main RadGrid isn't working on one of my pages. Funny thing is the Grid works on all other pages. If I add the old dlls from the previous version it works perfectly. The markup and the back-end C# has not changed at all, just a simple upgrade. Any advice on how to fix this?

Josh
pmourfield
Top achievements
Rank 1
 answered on 16 Apr 2012
1 answer
139 views
We have an issue where if a user opens the calendar to a date that excludes certain resources and then navigates to the next week, for example, where those resources should be visible, they do not appear.  As I understand it this is a limitation of Web Service binding mode where a calendar rebind does not rebind the resources just the events.  Is there a possible work around for this?

We can of course do a full postback for this but we would need to capture the date the user was intending to navigate to and implement a great deal more client side and server side logic to make sure we delivered them to their intended date. 

Ovi
Peter
Telerik team
 answered on 16 Apr 2012
1 answer
257 views
Hi,

i have 2 controls, textbox and datepicker,

i used tooltipmanager, how i remove all tooltip on the calendar, but keep the tooltip on the textbox ?

thanks in advance.
<telerik:RadScriptManager ID="RadScriptManagerDefault" runat="server" EnableScriptCombine="false">
       </telerik:RadScriptManager>
       <telerik:RadToolTipManager runat="server" ID="ToolTipManager" AutoTooltipify="true"
           Position="TopRight" Skin="Office2007">
       </telerik:RadToolTipManager>
       <br /><br /><br />
       <asp:TextBox ID="TextBox1" runat="server" ToolTip="halo"></asp:TextBox>
       <br /><br />
       <telerik:RadDatePicker ID="RadDatePicker1" runat="server" Width="110">
       </telerik:RadDatePicker>
       <br /><br />
       <telerik:RadDatePicker ID="RadDatePicker2" runat="server" Width="110">
       </telerik:RadDatePicker>
Shinu
Top achievements
Rank 2
 answered on 16 Apr 2012
1 answer
115 views
I know a lot of discussion are about it, probably i'm dumb enough to not see how to use them for my case.

ASPX: contains a couple of ASCX (ASCX1, ASCX2). It needs a radajaxmanager
ASCX2: within I have a radwindow. as i close it I need to perform  an AjaxRequest

How to?

First, where do i place my javascript?

        function OpenNewsCategory(ID, SelCat) {
            var wnd = $find("<%=RadWindowName.ClientID%>");
            wnd.show();
            wnd.setUrl("mypgae.aspx?ID=" + ID);
        }

        function closeRadWindow(oWnd, args) {
            var arg = args.get_argument();
            var arguments;

            if (arg) {           
                 if (arg.Index != '') {                
                    arguments = arg.Index + "," + arg.bSender;
                    alert('closeRadWindow parameters ' + arguments);
                }  
                oWnd.argument = null;
            }

            ajaxManager.ajaxRequest('closeRadWindow' + arguments);
        }

Second, I would like to manage the servside code of ajaxrequest within the usercontrol and the javascript too. is it possibile?
do i need radajaxproxy? if it's so, how?

Thank you
Jayesh Goyani
Top achievements
Rank 2
 answered on 16 Apr 2012
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?