Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
113 views
Hi everybody!

What I need to do is to be able to copy an appointment in the scheduler, using drag and drop.

I've created a very simple JS function to do that. It should make a copy of the dragged appointment and insert it in the scheduler, and by not calling the eventArgs.set_cancel(true) the initial appointment would be updated to the new timeslot:

function RadScheduler_ClientAppointmentMoveEnd(sender, args) { 
        var Appointment = args.get_appointment(); 
        sender.insertAppointment(Appointment); 
    } 

The problem is that the resources of the appointment are not sent together with the appointment back to the server, and when I'm trying to access a resource in my custom provider:

public override void Insert(RadScheduler owner, Appointment appointmentToInsert) 
//some other code here 
int TaskID = (int)appointmentToInsert.Resources.GetResourceByType("Task").Key; 

I'm getting a NullReferenceException.

On the client side I've checked the properties of the appointment before inserting it and it does indeed hold the resources.
On the server however, the resources seem to disapperar, although the other properties are sent correctly.

How should I solve this problem?

Thanks,
Stefan


Peter
Telerik team
 answered on 27 Nov 2009
5 answers
121 views
can some on fix the spelling mistake in the topic "preserve"

When i drag'n'drop appointments in the MonthView the date and duration is correct but the start time is set to mid-night. What am I doing wrong?

protected void AppointmentUpdate(object sender, Telerik.Web.UI.AppointmentUpdateEventArgs e) 
    // The problem is here: 
    e.Appointment.Start; // 08:00 
    e.Appointment.End; // 10:00 
    e.ModifiedAppointment.Start; // 00:00 (the date has changed but the time is wrong) 
    e.ModifiedAppointment.End; // 02:00
}

Peter
Telerik team
 answered on 27 Nov 2009
9 answers
259 views

Here is what I have:
I have a radgrid and in one of its column I show another radgrid. Parent(StudentsGrid) and Child(AttendanceGrid). For each student record there can be more than one attendance. I provide a checkbox in attendancegrid so the user can delete a particular attendance. I would like to get the selected attendance records. below is the code that I have until now. I would like to do this on client side not on server side.

pls let me know how to solve this.

 

 

 

 

function rowSelected() {

 

 

 

      var grid = $find("<%= rgStudents.ClientID %>");

 

 

      var masterTable = grid.get_masterTableView();

 

 

      var rows = masterTable.get_dataItems();

 

 

      for (var i = 0; i < rows.length; i++) {
             var
cell = masterTable.getCellByColumnUniqueName(rows[i], "Attendance");

 

              // how to get the reference to attendance radgrid and loop through its checked items????
}

 

 

 

 

 


<telerik:RadGrid ID="rgStudents" runat="server" AutoGenerateColumns="false">                     
            <MasterTableView DataKeyNames="StudentId">
                <Columns>     
                   
                    <telerik:GridBoundColumn DataField="StudentId" UniqueName="StudentId" Visible="false" />
                    <telerik:GridBoundColumn DataField="FName" UniqueName="FName" HeaderText="First Name" />
                    <telerik:GridBoundColumn DataField="LName" UniqueName="LName" HeaderText="Last Name" />                   
                     <telerik:GridTemplateColumn HeaderText="Attendance" UniqueName="Attendance">
                        <ItemTemplate>
                            <telerik:RadGrid ID="rgAttendance" runat="server" AutoGenerateColumns="false" AllowMultiRowSelection="true" >
                               <ClientSettings>
                                        <Selecting AllowRowSelect="true" />
                                         <ClientEvents OnRowSelected="rowSelected" OnRowDeselected="rowDeselected" />                               
                               </ClientSettings>
                               <MasterTableView DataKeyNames="AttendanceID">
                                   
                                    <Columns>
                                        <telerik:GridBoundColumn DataField="AttendanceId" UniqueName="AttendanceId" Visible="false" />                                       
                                        <telerik:GridBoundColumn DataField="CourseNo" HeaderText="CourseNo" />
                                        <telerik:GridBoundColumn DataField="Attendance" HeaderText="Date" />                                       
                                        <telerik:GridClientSelectColumn UniqueName="checkboxDelete"/>
                                    </Columns>
                               </MasterTableView>                               
                            </telerik:RadGrid>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>             
                </Columns>       
            </MasterTableView>
        </telerik:RadGrid>

Pavlina
Telerik team
 answered on 27 Nov 2009
5 answers
264 views
I am attempting to prevent a RadDock from being dragged outside of a div containing three RadDockZones. The reason I am trying to do so is that I want RadDocks to be confined to a particular region on the page without being able to drag off that region.

The PortalSite demo shows that the current implementation doesn't prevent you from dragging RadDocks into infinity off the right and bottom hand of your page, allowing the user to scroll well beyond the page. If the dock could be confined to a div area then this could be prevented and could also be useful for other scenarios, though I would accept not being able to drag the docks infinitely off the page as Google IG does.

I assume confining the docks is a question of constantly evaluating the div's position on the OnClientDockPositionChanging event and if the area of the dock is outside the boundary of the current div's positioning, then we'd have to find a way to prevent the position change without exiting the drag, but this would likely greatly affect performance.
Pero
Telerik team
 answered on 27 Nov 2009
1 answer
446 views
I try to use a custom DataTable for the datasource. But i got no error, but nothing are displayed.

    Protected Sub Page_Load(ByVal sender As ObjectByVal e As System.EventArgs) Handles Me.Load  
 
        Dim dtTable As New DataTable  
        Dim dtRow As DataRow  
 
        dtTable.Columns.Add(New DataColumn("ID", System.Type.GetType("System.Int32")))  
        dtTable.Columns.Add(New DataColumn("Title", System.Type.GetType("System.String")))  
        dtTable.Columns.Add(New DataColumn("URL", System.Type.GetType("System.String")))  
        dtTable.Columns.Add(New DataColumn("ParentID", System.Type.GetType("System.Int32")))  
        dtTable.TableName = "SiteMap" 
        dtRow = dtTable.NewRow  
        dtRow.Item("ID") = 1  
        dtRow.Item("Title") = "Entreprise" 
        dtRow.Item("URL") = System.DBNull.Value  
        dtRow.Item("ParentID") = System.DBNull.Value  
        dtTable.Rows.Add(dtRow)  
 
        dtRow = dtTable.NewRow  
        dtRow.Item("ID") = 2  
        dtRow.Item("Title") = "Test" 
        dtRow.Item("URL") = "" 
        dtRow.Item("ParentID") = 1  
        dtTable.Rows.Add(dtRow)  
 
 
        SiteMap1.DataSource = dtTable  
    End Sub 

    <telerik:RadSiteMap runat="server" ID="SiteMap1"  Skin="WebBlue" 
        ShowNodeLines="true" MaxDataBindDepth="2" DataFieldID="ID" DataFieldParentID="ParentID" DataTextField="Title" > 
        <LevelSettings> 
            <telerik:SiteMapLevelSetting Level="0">  
                <ListLayout RepeatColumns="3" AlignRows="true" /> 
            </telerik:SiteMapLevelSetting> 
        </LevelSettings> 
    </telerik:RadSiteMap> 

any suggestion?
Paul
Telerik team
 answered on 27 Nov 2009
5 answers
166 views
Hi, this my sql code:

SELECT     Customer.CustomerID, StateAfi.Icono, Customer.FirstName, Customer.Parentafi  
FROM       Customer INNER JOIN 
           StateAfi ON Customer.Stateafi = StateAfi.Stateafi   
           WHERE Parentafi>=@Parentafi or CustomerID=@Parentafi 

and my data:

CustomerID     parentafi
1                      NULL
2                      1
3                      2
4                      2
5                      2
6                      5

my problem is when i choose like this:

@Parentafi  =  2

my first row is CustomerID = 2 and his Parentafi = 1, not "Null" and always i see a message error, how i can fix this problem,  please thx!
Veselin Vasilev
Telerik team
 answered on 27 Nov 2009
7 answers
244 views
Hi,

I have just updated to the Q1 2008 release of both ASP.NET Ajax and ASP.Net toolset.  I am going through a number of pages trying to update existing ASP.NET controls to ASP.NET Ajax controls and have succeeded with most, but the ComboBox is giving me a problem.

I have an Object datasource on a page (called dsProfession) which returns a simple datatable, and the ASP.NET combobox was linked to this OK.  When I change to ASP.NET Ajax combobox it does not like me just putting in the columns names from the Object datasource as it seems to want to validate them.

Is there any work around for this other than manually assigning the values when the page is opened?

The definition of the Combobox is:
<telerik:RadComboBox ID="ddlProfession" runat="server"   
AppendDataBoundItems="True" DataSourceID="dsProfession"   
DataTextField="Name" DataValueField="GroupRef"   
MarkFirstMatch="True" Skin="WindowsXP" Width="200px"   
AutoPostBack="True"   
ToolTip="Select a Profession for the fee quote line from the drop down list">  
<Items> 
   <telerik:RadComboBoxItem runat="server" Text="NONE" Value="-NONE-" /> 
</Items> 
</telerik:RadComboBox> 

and the definition for the Object datasource is:

<asp:ObjectDataSource ID="dsProfession" runat="server"   
SelectMethod="ListGroup" TypeName="dbGroup2  
CacheDuration="1800"   
OldValuesParameterFormatString="original_{0}">  
<SelectParameters> 
 <asp:Parameter DefaultValue="false" Name="ShowArchived" Type="Boolean" /> 
</SelectParameters> 
</asp:ObjectDataSource> 

David Penny
Pillar Software
Simon
Telerik team
 answered on 27 Nov 2009
8 answers
264 views

Hi,

we are using ajax extender controls and radgrid in same form, when we try to refresh the grid using the following javascript code:

 window["<%=rgJobSentTechnicianList.ClientID%>"].AjaxRequest('<%=rgJobSentTechnicianList.UniqueID%>', 'Refresh');                

 we are getting javascript error( "Sys.InvalidOperationException: Two Componentswith the same id ").  Please help me to resolve this problem..

Thanks in Advance,

Karthik
Yvette
Top achievements
Rank 1
 answered on 27 Nov 2009
5 answers
232 views
Hi!

Just a simple question. How do I get the text value of a RadTimePicker control in the code behind? I have searched for it but can't seem to find it. There is a DateInput.Text property but that doesn't show the text written. I must be able to distinguish between an empty control and an invalid one. So, if someone for example writes "xyz" into the control, where do I find this value?

Thanks!
Markus Jansson
Top achievements
Rank 1
 answered on 27 Nov 2009
5 answers
145 views
Hi,

I encountered a problem when i tried to embed video with the radeditor: the video wont play. So i tried the same with the demo project here: http://demos.telerik.com/aspnet-ajax/editor/examples/default/defaultcs.aspx (used the RadNavigation.avi video) but it does not work there either. both in the dialog as in the editor in preview mode.

Tried several computers, IE 6 ,7 and 8.

Video plays fine when opened manually, so its not a codec problem.

I just selected a video and inserted it, did not change any settings.

Anyone know whats going on and how to fix this?
Rumen
Telerik team
 answered on 27 Nov 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?