Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
74 views
Hi there

How do I prevent the user to enter appointments in a weekview for times that have already past?

I don't want the user to be able to enter appointments prior to date.time.now.

How do I go about it. Is it possible to color the passt times in a weekview differently.?

Regards Markus
Markus
Top achievements
Rank 2
 answered on 18 Nov 2010
2 answers
125 views
Hello,

I really like your demo with slot selection with dragging over the time slot area, however I could not find the way how to use this functionality in ASP.NET MVC.
I'm using  OnClientTimeSlotContextMenuItemClicked="TimeSlotContextMenuItemClicked" event, but I can find only starttime in eventArgs. Can You please suggest me, how to obtain end time in selected slot area?


function TimeSlotContextMenuItemClicked(sender, eventArgs) {
  var type = eventArgs.get_item().get_value();
  var time = eventArgs.get_slot().get_startTime().format('dd/MM/yyyy H:mm');
}

radScheduler settings:

<telerik:RadScheduler runat="server" ID="RadScheduler1" AllowDelete="false" AllowEdit="true"  OnClientRequestFailed="requestFailed"  EnableExactTimeRendering="true"
           RowHeight="16px"  AllowInsert="false" MinutesPerRow="15" StartEditingInAdvancedForm="false"
           StartInsertingInAdvancedForm="false" OnClientAppointmentDoubleClick="OnClientAppointmentDoubleClick"
           OnClientTimeSlotContextMenuItemClicked="TimeSlotContextMenuItemClicked" OnClientTimeSlotClick="OnClientTimeSlotClick"
           OnClientAppointmentDeleting="OnClientAppointmentDeleting" OnClientAppointmentDataBound="OnClientAppointmentDataBound"
           Height="900px" OnClientAppointmentEditing="OnClientAppointmentEditing" OnClientAppointmentContextMenuItemClicked="appointmentContextMenuItemClicked"
           OnClientAppointmentContextMenu="OnClientAppointmentContextMenu"
           SelectedView="WeekView" DayHeaderDateFormat="dddd, dd MMMM yyyy" HoursPanelTimeFormat="HH:mm"
           OnClientAppointmentsPopulating="dataPopulating" OnClientAppointmentsPopulated="dataPopulated" Culture="cs-CZ">
            
           <AppointmentContextMenus>
               <%--The appointment context menu interaction is handled on the client--%>
               <%--See the JavaScript code above--%>
               <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
                   <Items>
                       <telerik:RadMenuItem Text="Export iCalendar" Value="GenerateVCal" ImageUrl="~/Content/Images/Icons/iCalendar16.png" />
                       <telerik:RadMenuItem IsSeparator="True" />
                       <telerik:RadMenuItem Text="Edit" Value="CommandEdit" ImageUrl="~/Content/Images/DataEditing/Edit.gif" />
                       <telerik:RadMenuItem Text="Delete"  Value="CommandDelete" ImageUrl="~/Content/Images/DataEditing/Delete.gif" Enabled="True" />
                   </Items>
               </telerik:RadSchedulerContextMenu>
           </AppointmentContextMenus>
           <TimeSlotContextMenus>
               <telerik:RadSchedulerContextMenu runat="server" ID="TimeSlotContextMenu">
                   <Items>
                       <telerik:RadMenuItem Text="CreateAppointment" Value="CreateAppointment"  />
                       <telerik:RadMenuItem Text="CreateTask" Value="CreateTask"  />
                       <telerik:RadMenuItem Text="CreateEmail" Value="CreateEmail"  />
                       <telerik:RadMenuItem Text="CreateCall" Value="CreateCall" />
                        <telerik:RadMenuItem Text="CreateTimesheet" Value="CreateTimesheet" />
                   </Items>
               </telerik:RadSchedulerContextMenu>
           </TimeSlotContextMenus>
           <TimelineView GroupBy="Calendar" GroupingDirection="Vertical" />
           <AdvancedForm Enabled="false" EnableResourceEditing="false" />
           <WebServiceSettings Path="~/Models/SchedulerWebService.asmx" ResourcePopulationMode="ClientSide" />
       </telerik:RadScheduler>
   </telerik:RadCodeBlock>

Nikolay Tsenkov
Telerik team
 answered on 18 Nov 2010
1 answer
100 views
Hello,

Having a minor display issue with the client events rowmouseover/rowmouseout.  I think it's more of a JS/HTML issue than a telerik issue.  But to confirm: I display a popup when the user mouses over a row in the grid.  The issue is that when the user doesn't mouse out of the row, but mouses across cells in the same row, this triggers the mouseout/mouseover events.  Is there a way to circumvent that?  I have an idea of what I can do, but I was wondering if there is something built-in that I could adjust for this issue.

Thanks.
Mira
Telerik team
 answered on 18 Nov 2010
1 answer
64 views
Hi

Our client is asking for the time to be displayed horizontally and resources to be displayed vertically, are there any plans to add this to the scheduler control?
Nikolay Tsenkov
Telerik team
 answered on 18 Nov 2010
2 answers
119 views
<telerik:GridTemplateColumn UniqueName="MyColumn" DataField="MyColumn">
    <ItemTemplate>
        <telerik:RadComboBox ID="rcbMyList" runat="server"
            OnClientSelectedIndexChanged="MyListChanged" >
        </telerik:RadComboBox>
    </ItemTemplate>
</telerik:GridTemplateColumn>

A master view of a gird is set to EditMode="InPlace" and InsertItemDisplay="Bottom". Suppose a new row has been added by clicking a button and the new row looks like just another "existing" row.

What I need is, updating other elements in the new row when the index of a combo box in the new row is changed, and all things should be done at client side.

I tried to set up a client event handler but I don't know how to get the elements in the new row in my event handler (javascript). I would say my javascript works for existing rows - I can get any row from the object "sender.get_parent()" - but it doesn't work for the new row.

Any idea about this problem?

--Y. Fan
Yu
Top achievements
Rank 1
 answered on 18 Nov 2010
3 answers
112 views
Hi,

When any field is changed in the filter expressions, the preview string is refreshed if the AllowFilterOnBlur property is set to true. Can you tell me which event is triggerred at that time? I need to add some code to do something when this happens. If there are events defined on the client side and on the server side, please list all of them.

Thanks a lot!

Bruce
Vasil
Telerik team
 answered on 18 Nov 2010
2 answers
107 views
Hi,

When I try to upload a png image with the radeditor image manager, it always fails.
It doesn't show an error, but the uploaded file is 0kb.
The filetype is allowed (File extensions allowed:*.jpg, *.jpeg, *.png, *.bmp, *.gif)
It only happens with png.

What could be wrong?

Tnx.
Igor Kalders
Top achievements
Rank 1
 answered on 18 Nov 2010
3 answers
133 views
Hi everyone,

     Anyone noticed that when you hard code a pagination size (in the code behind) for a radgrid widget the default page size that appears in the drop-down (mine has options 10, 15, 20 and 50, with 15 as default) disappears?
   Has anyone else noticed this?

Example:

I have options 10, 15, 20 and 50. 15 is default. They all appear.

However when I set say (in the code behind): RadGrid1.Pagesize = 50;

what now happens is that I see (when I run the code) the following options: 10, 20 and 50. i.e. 15 has disappeared!

Ques: Is this a bug??
Vasil
Telerik team
 answered on 18 Nov 2010
1 answer
142 views
Hi,

I have a problem when i try to filter or group by any column of GridTemplateColumn Type, with anyother type there is no problem.
ther specific exception is: Microsoft JScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
(Exception Screenshot is attached)

The declaration for the specific column is:
<telerik:GridTemplateColumn HeaderText="GMT" SortExpression="GMT" UniqueName="GMT" >
<HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
<ItemTemplate>
<asp:Label runat="server" ID="lblGMT" Text='<%# Bind("GMT") %>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<br />
<telerik:RadNumericTextBox runat="server" Width="100px" ID="txtGMT" Text='<%# Bind("GMT") %>'  DataType="System.Int16" MaxValue="12" MinValue="-12" NumberFormat-DecimalDigits="0" ShowSpinButtons="true" />
<span style="color: Red">*</span><br />                                           
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtGMT"
ErrorMessage="This field is required" runat="server" Display="Dynamic">
</asp:RequiredFieldValidator>
</EditItemTemplate
</telerik:GridTemplateColumn>

The scenario:
I have  a MutliView and tabstrips. I have a PageView that contains a combobox and a Radgrid, all with RadAjaxManagerProxy with a MasterPage. The combobox updates the RadGrid, everything works fine just when i try to filter or group by those kind of columns the app crushes with the exception.

I hope you can help me.

Best Regards.
-Luis
Marin
Telerik team
 answered on 18 Nov 2010
2 answers
268 views
I have two pages that use a RadAjaxLoadingPanel for a smooth refresh of a RadGrid. In each case, the RadGrid uses an ASP.NET ObjectDataSource to load data, and the object data source handles all paging, sorting, and filtering. The RadGrids enable multicolumn sorting and column reordering. Both pages use an ASP.NET timer for periodic refresh.

One page works perfectly; the page refresh is limited to the grid, for timer, paging, sorting, and column ordering. The loading panel shows during refresh, and the refresh is smooth. On the other page, the loading panel never shows. In the VS development server, the refreshes are usually limited to the grid (not always); however in IIS, I always get a full-page reload instread of a refresh, for all events (timer, paging, sorting, column reorder).

Environment: Windows 7 x64, VS 2010, IIS 7, Telerik ASP.NET Ajax Q2 2010 SP2.

Here is the markup for the loading panel on the page that fails. The page that works is essentially identical except that there are no scripts or services referrenced inside the radScriptManager.

 

 

 

<telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    <Scripts>
        <asp:ScriptReference Path="~/JavaScript/SynapseStudyCache.js" />
    </Scripts>
    <Services>
        <asp:ServiceReference Path="~/WebServices/Synapse/Caching.asmx" />
    </Services>
</telerik:RadScriptManager>
<telerik:RadAjaxLoadingPanel ID="RadiologistWorklistLoadingPanel" runat="server" InitialDelayTime="0" MinDisplayTime="300" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="Timer1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdWorkList" LoadingPanelID="RadiologistWorklistLoadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="rdWorkList">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="rdWorkList" LoadingPanelID="RadiologistWorklistLoadingPanel" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

 

There are no javascript references to either the loading panel or the RadGrid, and the code-behind handles only the ItemDataBound event for the grid. The code-behind handles Timer1.Tick but does nothing with it.

Any suggestions on why the page does not refresh properly?

Diane
Top achievements
Rank 1
 answered on 18 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?