Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
91 views
If I don't enable MakeUrlsAbsolute, then every link in the editor is made relative. In most cases, this is ok - I want relative links to pages within my site. But if a user wants to enter a link to an external site, it is a problem.

I see that if the link has no query string, it remains absolute. So, for example, <a href="http://www.yahoo.com"> remains unchanged. However, if I need any parameters, like <a href="http://www.yahoo.com/somepage?id=47">, then the domain is stripped and I end up with <a href="/somepage?id=47"> which will not work.

Is there any way to configure the editor to do this? Or will I have to use MakeUrlsAbsolute in all cases, and write a content filter to transform relative links?
Dan Ehrmann
Top achievements
Rank 1
 answered on 13 Sep 2011
2 answers
110 views

When I create an exception appointment, should the regularly scheduled appointment still be shown? For example I have rec appointments that occur on Fridays at 11AM. When I drag and drop one of the occurrences to a brand new day and time (Wednesday for example) the new appointment shows up but the old one on Friday also is showing up. When I drag-and-drop in the RecurrenceExceptionCreated event I create a new exception and update master appointment's recurrence rule with the new rule containing date and time of the exception. In the new exception appointment I reference DataRecurrenceParentKeyField of the master appointment. Since the regularly scheduled appointment is modified I don't want to display it any longer for that week. What am I doing wrong? Thanks
Ilya
Top achievements
Rank 1
 answered on 13 Sep 2011
4 answers
148 views
Hi All.
I try to add appointment organizer to one of our projects using your scheduler control. It working fine if not use Advanced form for editing and inserting appointments. But I need tp add just one text box in have to use your customer controls from live examples. I added those controls using Scheduler scenario wizard. problem now how to bind data from LinqDataSources (used for Appoointments and ResourceTypes) to the form. Have you example? Thanks.
<telerik:RadScheduler runat="server" ID="RadScheduler1" Skin="Windows7" Height="551px"
                    ShowFooter="true" TimeZoneOffset="03:00:00" DayStartTime="08:00:00" DayEndTime="21:00:00"
                    FirstDayOfWeek="Monday" LastDayOfWeek="Friday" EnableDescriptionField="true"
                    AppointmentStyleMode="Default" OnNavigationComplete="RadScheduler1_NavigationComplete" OnClientFormCreated="schedulerFormCreated"
                    OnAppointmentCreated="RadScheduler1_AppointmentCreated" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound"
                    OnAppointmentDelete="RadScheduler1_AppointmentDelete" OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                    OnAppointmentInsert="RadScheduler1_AppointmentInsert" DataKeyField="AppointmentID" CustomAttributeNames="Charge"
                    DataSubjectField="AppSubject" DataEndField="DateTimeDepart" DataStartField="DateTimeArrived"
                    DataDescriptionField="AppDescription" DataSourceID="LinqDataSource1" GroupBy="Resources"
                    StartEditingInAdvancedForm="true" StartInsertingInAdvancedForm="true">
                    <AdvancedForm Modal="true" />
                    <TimelineView UserSelectable="false" />
                    <MonthView UserSelectable="false" />
                    <WeekView UserSelectable="false" />
            <AdvancedForm Modal="true" />
            <Reminders Enabled="false" />
             <AppointmentTemplate>
                        <div class="rsAptSubject">
                            <%# Eval("Subject") %>
                        </div>
                        <%# Eval("Description") %>
                    </AppointmentTemplate>
            <%--<AdvancedEditTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("AppSubject") %>'
                    Description='<%# Bind("AppDescription") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' CustomerID='<%# Bind("CustomerID") %>'
                    ResourceID='<%# Bind("ResourceID") %>' />
            </AdvancedEditTemplate>
            <AdvancedInsertTemplate>
                <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("AppSubject") %>'
                    Description='<%# Bind("AppDescription") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
                    RecurrenceRuleText='<%# Bind("RecurrenceRule") %>' Reminder='<%# Bind("Reminder") %>'
                    AppointmentColor='<%# Bind("AppointmentColor") %>' CustomerID='<%# Bind("CustomerID") %>'
                    ResourceID='<%# Bind("Room") %>' />
            </AdvancedInsertTemplate>--%>
             <TimeSlotContextMenuSettings EnableDefault="true" />
                    <AppointmentContextMenuSettings EnableDefault="true" />
                    <ResourceTypes>
                        <telerik:ResourceType KeyField="ContactID" Name="Contacts" TextField="LastName" ForeignKeyField="ContactID"
                            DataSourceID="LinqDataSource2" />
                        <telerik:ResourceType KeyField="ResourceID" Name="Resources" TextField="LastName"
                            ForeignKeyField="ResourceID" DataSourceID="LinqDataSource3" />
                    </ResourceTypes>
                </telerik:RadScheduler>
 <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Apointments" EnableInsert="true" EnableDelete="true" EnableUpdate="true">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Contacts">
    </asp:LinqDataSource>
    <asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="DataLogic.DataModels.KloudDataDataContext"
        TableName="AAA_Resources">
    </asp:LinqDataSource>

Peter
Telerik team
 answered on 13 Sep 2011
0 answers
128 views
It looks like the issue with databinding on Treeview with ParentID is been long one. I have seen old entries going back to 2005 till today with people experiencing the ParentID constraint issue. If you are here looking for a solution on the exception which was thrown at you starts as "The constraint cannot allow you...". Then you are in the right place. 

Basically, the dataset should have records for all parent ID's referred in the table. In order to make the Node as a Root so the tree can recognize it as the Root instead of looking for record in the dataset, you need to make that record Parent value as NULL. That's the solution for the issue. There were suggestions to do SELECT ChildID, Value, IF(ParentID=0, NULL, ParentID). This doesn't work in SQL, you have to do

SELECT ChildID, Value, CASE WHEN ParentID='' THEN NULL ELSE ParentID END As ParentID

It worked for me and it works for you. Also if you need to join the same table to get a parent, child relationship. Here is the query which you can use

WITH UserTable AS (SELECT U.EmployeeID, U.Employee, U.ManagerID FROM Employees U WHERE [EmployeeId] = '3434443'
UNION ALL SELECT U.EmployeeID, U.Employee, U.ManagerID FROM Employees U JOIN UserTable U2 ON (U.[ManagerId]=U2.[EmployeeId]))
SELECT EmployeeId,Employee, CASE WHEN EmployeeId='3434443' THEN NULL ELSE ManagerID END FROM UserTable

Hope this helps
Vijaianand
Top achievements
Rank 1
 asked on 13 Sep 2011
1 answer
59 views

 

 

Can someone show me how to set values on a tableview and make them show up from javascript?

I have been trying to do this, but it doesn't seem to work:

function ClientSelectedIndexChanged(sender, eventArgs) {
  
var item = eventArgs.get_item();
  
var item1 = item._attributes._data;
  
tableView._data._columnsData[2].value = item1.username;
  
tableView._data._columnsData[3].value = item1.firstname;
  
tableView._data._columnsData[4].value = item1.lastname;
  
tableView.rebind();
  
}

Regards,

Dan

Tsvetina
Telerik team
 answered on 13 Sep 2011
1 answer
173 views
I have reviewed many topics about RadWindow, RadWindowManager etc, but I am having trouble understanding the approach that I should take.

My goal is simple, I have a control heirarchy

Page.aspx
==== RadTabStrip
========RadTab
============UserControl
============Modal content (UserControl)
============UserControl
======================= Modal Content (UserControl)

See, I have nested controls that do their own thing, the need for modals / pop ups on different levels of the control tree, but each popup should appear as though it "owns the page".

My question: How should I approach this generally? Should I use RadWindows on the Page.aspx and "Add" controls to them at run-time? Or is there a way to manage RadWindows on various levels? I just don't understand how to manage the windows in this scenario.

Thanks,

Patrick
Marin Bratanov
Telerik team
 answered on 13 Sep 2011
1 answer
117 views
Having trouble adding labels to autogenerated web forms.  When these forms are generated they are generated using table row and table data structures.  I am trying to add a message to the top of the box using FindControl to find the Cancel button, then add a label to the top lvl of the naming container.  How do I add a label outside of the table structure so that it is at the top of the form instead of next to or below the cancel button?
Tsvetina
Telerik team
 answered on 13 Sep 2011
3 answers
189 views
Hello,

I have a problem when i try to open a new window from an open one.  The new window is dispayed at the layer behind the old one, while i want to show it in the front of the old window.
 You can find bellow code I used :

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" ShowContentDuringLoad="false" Modal="false" Behavior="Resize, Move, Close, Maximize, Minimize" Skin="WebBlue">
                                                        <Windows>
 <telerik:RadWindow ID="radDocWindow" runat="server" OnClientClose="refreshGed" DestroyOnClose="false" Behavior="Move, Close" AutoSize="true" Left="5px" Top="5px" />
.
.
.
.

            var URL = "<%=this.ApplicationPath%>ManageGed/EditDoc.aspx?type=add&business="+business.value+"&task="+task.value;
            if ( typeof GetRadWindow==='function' )
            {
                var oBrowserWnd = GetRadWindow();
            
                if (oBrowserWnd)
                {
                    var wm = oBrowserWnd.GetWindowManager();
                    var oWindow = wm.Open(URL,"radDocWindow");
                }
                else
                    var oWindow = window.radopen(URL,"radDocWindow");
            }
            else
                var oWindow = window.radopen(URL,"radDocWindow");

Is there a indispensable parameter to set for this goal?

Thank You for your suggestions!




                                                            
Marin Bratanov
Telerik team
 answered on 13 Sep 2011
3 answers
148 views

I have a RadDatePicker, and I'm setting the background color on the server side when it contains an invalid value like so:

dtStartDate.DateInput.Style.Add(HtmlTextWriterStyle.BackgroundColor, "red");


Then on the client side, I have this handler attached to the ClientEvents-OnValueChanged event of the child DateInput of the RadDatePicker.

function RemoveInvalidStyle(sender, args)
{
    sender.get_styles().EnabledStyle[0] = sender.get_styles().EnabledStyle[0].replace("background-color:red;", "");
    sender.get_styles().HoveredStyle[0] = sender.get_styles().HoveredStyle[0].replace("background-color:red;", "");
    sender.get_styles().FocusedStyle[0] = sender.get_styles().FocusedStyle[0].replace("background-color:red;", "");
    sender.updateCssClass();
}

This works just fine, they both change the background, but after the client call the background will be reset again on the first postback.  Is this due to that not being persisted in the viewstate?  Or is it being overwritten by the property set on the parent wrapper?
Mira
Telerik team
 answered on 13 Sep 2011
3 answers
118 views
Hi everybody,
I use a rad scheduler. I use a advanced form in this component. it opens but when I drag the form but is just moving to the right and left. How do i make the form is movable. javascript or property etc. ?? Thank you for your help...
Peter
Telerik team
 answered on 13 Sep 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?