Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
124 views
Hi All,
When I display the advanced form in my app (not Modal)...the RadScheduler "breaks up" the form into sections.
See attached image.

Anyone have any idea why this is happening?

Thank
Alex
Veronica
Telerik team
 answered on 30 Jun 2011
3 answers
138 views
hello,

How to unchecked the default saturday checked in RadSchedulerRecurrenceEditor in weekly option.
It always time checked the saturday in weekly option of RadSchedulerRecurrenceEditor.
I want to unchecked all the days in weekly option.

thanks

Best Regards,
Jiten
Veronica
Telerik team
 answered on 30 Jun 2011
5 answers
159 views
I am following the resource example (with changes) and I am getting an error (Microsoft JScript runtime error: Object doesn't support this property or method) when I am in the following function - it is bombing on slot.get_resource();

 

function isRoomOccupied(scheduler, start, end, slot, appointment)

{

//get the "Room" resource associated with the time slot

var currentRoom = slot.get_resource();

//get all appointments for this "room" in the specified period

var appointmentsForThisRoom = getAppointmentsInRangeByResource(scheduler, start, end, currentRoom, appointment);

//if the list of appointments is not empty there are other appointments in this slot

return appointmentsForThisRoom.get_count() > 0;

}

I am not sure what I am doing wrong. Thanks.

function isRoomOccupied(scheduler, start, end, slot, appointment)

 

{

 

//get the "Room" resource associated with the time slot

 

 

 

 

 

 

var currentRoom = slot.get_resource();

 

 

//get all appointments for this "room" in the specified period

 

 

 

 

 

 

var appointmentsForThisRoom = getAppointmentsInRangeByResource(scheduler, start, end, currentRoom, appointment);

 

 

//if the list of appointments is not empty there are other appointments in this slot

 

 

 

 

 

 

return appointmentsForThisRoom.get_count() > 0;

 

}

 

function warnIfOccupied(start, end, sender, args)

 

{

 

var slot = args.get_targetSlot();

 

 

var appointment = args.get_appointment();

 

 

 

if (isRoomOccupied(sender, start, end, slot, appointment))

 

{

alert(

"This room is not available in this time period.");

 

args.set_cancel(

true);

 

}

 

appointment.get_element().style.border =

"";

 

}

 

function onAppointmentResizeEnd(sender, args)

 

{

 

var start = args.get_appointment().get_start();

 

 

var end = args.get_targetSlot().get_endTime();

 

 

warnIfOccupied(start, end, sender, args);

}

 

function onAppointmentMoveEnd(sender, args)

 

{

 

var start = args.get_targetSlot().get_startTime();

 

 

var end = new Date(start.getTime() + args.get_appointment().get_duration());

 

 

warnIfOccupied(start, end, sender, args);

}

 

function onAppointmentInserting(sender, args)

 

{

 

var slot = args.get_targetSlot();

 

 

var start = slot.get_startTime();

 

 

var end = slot.get_endTime();

 

 

 

if (isRoomOccupied(sender, start, end, slot))

 

{

alert(

"This room is not available in this time period.");

 

args.set_cancel(

true);

 

}

}

 

 

 

<

 

telerik:RadScheduler runat="server" ID="RadScheduler1" OnClientAppointmentEditing="AppointmentEditing"

 

 

 

 

 

 

OnClientAppointmentInserting="AppointmentInserting" EnableCustomAttributeEditing="true"

 

 

 

 

 

 

SelectedDate="2009-07-26" DataSourceID="EventsDataSource" DataKeyField="MeetingID"

 

 

 

 

 

 

DataSubjectField="Description" DataStartField="Start" DataEndField="End" SelectedView="WeekView"

 

 

 

 

 

 

FirstDayOfWeek="Sunday" LastDayOfWeek="Saturday" Skin="Vista" ShowResourceHeaders="false"

 

 

 

 

 

 

CustomAttributeNames="Description,HostedBy,Room" Height="100%" Localization-ConfirmDeleteText="Are you sure you want to delete this meeting?"

 

 

 

 

 

 

TimelineView-UserSelectable="false" OnClientAppointmentMoveEnd="onAppointmentMoveEnd"

 

 

 

 

 

 

OnClientAppointmentResizeEnd="onAppointmentResizeEnd">

 

 

 

 

 

 

<ResourceTypes>

 

 

 

 

 

 

<telerik:ResourceType KeyField="Room" Name="Room" TextField="Room" ForeignKeyField="Room"

 

 

 

 

 

 

DataSourceID="RoomsDataSource" />

 

 

 

 

 

 

</ResourceTypes>

 

 

 

 

 

 

<AppointmentTemplate>

 

 

 

 

 

 

<div style="color: Maroon;">

 

 

 

 

 

<%

#Eval("Description")%></div>

 

 

 

 

 

<%

-- <br />--%>

 

 

<div style="color: Teal;">

 

 

 

 

 

 

</font>Host:&nbsp;<%#Eval("HostedBy")%></div>

 

 

 

 

 

<%

-- <br />--%>

 

 

<div style="color: Fuchsia;">

 

 

 

 

 

Room:

&nbsp;<%#Eval("Room")%></div>

 

 

 

 

 

 

</AppointmentTemplate>

 

 

 

 

 

 

</telerik:RadScheduler>

 

 

 

 

 

 

<asp:Button ID="btnGo" runat="server" Text="Go" Visible="false" />

 

 

 

 

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server"></asp:SqlDataSource>

 

 

 

 

 

 

<asp:SqlDataSource ID="EventsDataSource" runat="server" ProviderName="System.Data.SqlClient"

 

 

 

 

 

 

ConnectionString="<%$ ConnectionStrings:MCHPEVENTS %>" SelectCommand="SELECT [MeetingID], [Description], [Start], [End], [Room], [HostedBy], [Food], [Beverages], [Projector], [Easel], [Flipchart], [Microphone], [HotelAVSupplies], [Comments] FROM [Meetings]"

 

 

 

 

 

 

InsertCommand="INSERT INTO [Meetings] ([Description], [Start], [End], [Room]) VALUES (@Description, @Start, @End, @Room)"

 

 

 

 

 

 

UpdateCommand="UPDATE [Meetings] SET [Description] = @Description, [Start] = @Start, [End] = @End, [Room] = @Room WHERE (MeetingID = @MeetingID)"

 

 

 

 

 

 

DeleteCommand="DELETE FROM [Meetings] WHERE [MeetingID] = @MeetingID">

 

 

 

 

 

 

<DeleteParameters>

 

 

 

 

 

 

<asp:Parameter Name="MeetingID" Type="Int32" />

 

 

 

 

 

 

</DeleteParameters>

 

 

 

 

 

 

<UpdateParameters>

 

 

 

 

 

 

<asp:Parameter Name="MeetingID" Type="Int32" />

 

 

 

 

 

 

<asp:Parameter Name="Description" Type="String" />

 

 

 

 

 

 

<asp:Parameter Name="Start" Type="DateTime" />

 

 

 

 

 

 

<asp:Parameter Name="End" Type="DateTime" />

 

 

 

 

 

 

<asp:Parameter Name="Room" Type="String" />

 

 

 

 

 

 

</UpdateParameters>

 

 

 

 

 

 

<InsertParameters>

 

 

 

 

 

 

<asp:Parameter Name="Description" Type="String" />

 

 

 

 

 

 

<asp:Parameter Name="Start" Type="DateTime" />

 

 

 

 

 

 

<asp:Parameter Name="End" Type="DateTime" />

 

 

 

 

 

 

<asp:Parameter Name="Room" Type="String" DefaultValue="TBD" />

 

 

 

 

 

 

</InsertParameters>

 

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

 

<asp:SqlDataSource ID="RoomsDataSource" runat="server" ProviderName="System.Data.SqlClient"

 

 

 

 

 

 

ConnectionString="<%$ ConnectionStrings:MCHPEVENTS %>" SelectCommand="SELECT DISTINCT([Room]) FROM [Meetings]">

 

 

 

 

 

 

</asp:SqlDataSource>

 

 

 

 

Veronica
Telerik team
 answered on 30 Jun 2011
1 answer
75 views
Hi,

I am using Master/Details Client-side Data Binding in latest teletik version - RadControls for ASP.NET AJAX Q1 2011 

'This is my WCF service 
 <OperationContract()> _
    Public Function GetdataSelect(ByVal startRowIndex As Integer, ByVal maximumRows As Integer, ByVal sortExpression As String, ByVal filterExpression As String) As MyData
        Dim data As GridBindingData = RadGrid.GetBindingData("LinqToSql.DataClassesDataContext", "TrnApproval", startRowIndex, maximumRows, sortExpression, filterExpression)
        Dim result As New MyData()
        Dim db As New DataClassesDataContext
        result.Data = From c In db.TrnApprovals Select c.TrnID, c.ApproverID
       
        result.Count = data.Count
        Return result
    End Function

While connecting with WCF service i am getting below error.

System.InvalidOperationException: Could not find the type specified in the ContextTypeName property of LinqDataSource ''. ---> System.Web.HttpException: Could not load type 'LinqToSql.DataClassesDataContext'. at System.Web.UI.WebControls.LinqDataSourceView.get_ContextType()
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTable(DataSourceOperation operation)
   at System.Web.UI.WebControls.LinqDataSourceView.CreateContextAndTableForSelect()
   at System.Web.UI.WebControls.LinqDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments)
   at System.Web.UI.WebControls.LinqDataSourceView.Select(DataSourceSelectArguments arguments)
   at Telerik.Web.UI.GridLinqDataSource.GetData()
   at Telerik.Web.UI.RadGrid.GetBindingData(String contextTypeName, String tableName, Int32 startRowIndex, Int32 maximumRows, String sortExpression, String filterExpression)
   at GridBind.GetdataLoad() in E:\Developments\demowcf\App_Code\Gridbind.vb:line 145

Please do the needful.
Princy
Top achievements
Rank 2
 answered on 30 Jun 2011
3 answers
62 views
Hello,

I have a radgrid, which has 25 records displayed.  In the grid is a GridTemplateColumn with a RadComboBox in it.  The combo box has enabled loading on demand.  What I'd like to do is when one combo box loads, load them all.  I don't know if something like that is possible?  It's the same data for all.

Thanks,

Brian
Peter
Telerik team
 answered on 30 Jun 2011
3 answers
132 views
We have found that on pages containing the RadEditor web part, the page references/loads AssetPickers.js and HtmlEditor.js. On our public site, we do not need these files referenced or loaded because the content will only be viewed and will never be edited, therefore we do not need the editor functionality. (We use content deployment to push content to our live site.)

In order to reduce weight and page load time, is there a way to prevent HtmlEditor.js and AssetPickers.js from being referenced or loaded on our public facing site?

Thanks!
Stanimir
Telerik team
 answered on 30 Jun 2011
3 answers
91 views
Hi there,

I'm trying to bind controls in my webApplication to a ViewModel class.
The binding itself works fine, but i got a problem, resolving the correct objects.

I bound a RadGrid to an ObjectDataSource, refering my class "PersonsViewModel"
The select-method is
        public List<Person> GetPersons()
        {
            return DataProvider.GetPeople();
        }

Now I'd like to resolve the selectedItem for example:

        var items = RadGrid1.SelectedItems;
        Person p = items[0].DataItem as Person;

My problem is, that items[0].DataItem is always null.
I don't get why, because the item is databound.



Any help would be apprechiated.
Thanks,

Thomas
Iana Tsolova
Telerik team
 answered on 30 Jun 2011
1 answer
78 views
I am using a LoadOnDemand Combo Box because the amount of data can sometimes be in the 10s of thousands.  I have enabled virtualscrolling and ShowMoreResults.  My question is that when loading data in portions of 100 - when it has to make an ajax call back to the server to get more data - is there a way to show an animated image in the combo box or some type of text like "Loading.." while is retreiving the next batch of data from the server and showing it in the UI?
Princy
Top achievements
Rank 2
 answered on 30 Jun 2011
2 answers
133 views
Hi all,

My project has grown outside the scope of the functionality provided by RadDockLayout. I am hoping to create my own manager class which emulates the functionality currently provided to me by RadDockLayout. 

So, I have classes which inherit from RadDock and RadDockZone, CormantRadDock and CormantRadDockZone. I am letting RadDockLayout manage these objects, but it is a pain to constantly have to cast my RegisteredDocks collection constantly. In addition, I do the same sort of control regeneration that RadDockLayout provides, except applied to more controls. As such, I have a firm understanding of what is needed to manage these controls.

That being said, I would like to make sure I do not miss any hidden dependencies.

So, I use the events for RadDockLayout_SaveDockLayout and LoadDockLayout. I believe I can just append additional code to the Page_Load method to emulate what is occurring in RadDockLayout_LoadDockLayout (please correct me if this is an incorrect belief). I am unsure of how to emulate RadDockLayout_SaveDockLayout -- and would like some advice. How can my manager trigger on this event? 

Other than that, is there anything hidden going on that I should be aware of that would make removing RadDockLayout from a page full of dynamic RadDocks and RadDockZones?

Thanks

Sean
Pero
Telerik team
 answered on 30 Jun 2011
1 answer
57 views

Hi,

We are creating an application that allows users to enter and view news stories. In the news listing screen, we are using a radgrid to display the news stories. Each row shows the news headline and the first two lines of the body of the story. We would like to allow users to click on an icon beside a row to dynamically expand and contract the body of the new story so that the first two lines expands to the full story and then collapses back to the first two lines.

On the initial load of the news listing, we will not load the full body of each story, just the first two lines. So, the expand function will have to retrieve the body. We would prefer to use a Webservice call to retrieve the body of the story.

When the body of the content is expanded, we would like to show some minor animation effects to make the presentation of the story a little more interesting - e.g. have the panel expand downwards a little slower.

What is the best way to accomplish this? We have been using the RadXmlHttpPanel to call the Webservice to get the body of the story, but this control does not provide any effects in displaying the content.

So, in summary, we would like to do the following:

1. Show a list of news stories with the first two lines of the body displayed.
2. The user clicks a button (or "More..." link) to expand the body.
3. A Web Service is called to full body of the story.
4. Once retrieved, the body of the story slowly opens up
5. The user clicks a button (or "Less...") link to contract the body of the story

Any thoughts?
Pero
Telerik team
 answered on 30 Jun 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
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
Iron
Iron
Sergii
Top achievements
Rank 1
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?