Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
91 views
Hello,


I have a problem with my binding GeoJSON, indeed I followed your tutorial and your documentation, but nothing works. It's been 2 days since I test and I don't understand where is my error. Same with your sample (live-demo)

Can you help me? Here is my code: http://puu.sh/eepPn/4e9c502a49.png

Here is the result: http://puu.sh/eepUv/ad556aeae5.png

Plz help me !


Naografix
Top achievements
Rank 1
 answered on 09 Jan 2015
3 answers
247 views
Hi

I am trying to export a snippet of code to PDF but the styles aren't being applied. They definitely exist and work since I have generated a standard html page with the exact same html and all the CSS styles are applied. Is there any setting/config/workaround for this? I need the PDF to look exactly like the website.

Thanks
Ianko
Telerik team
 answered on 09 Jan 2015
4 answers
205 views
Hello,
         I used the Rad Scheduler For selection of Etc Date in calendar. So When Testing have the 8 days (12/25/2014 to 01/05/2015) in Update Etc then selection of date 12/25/2014 to 12/31/2014 and extra 2 column selected in December month in calender. And the next month (January) selected date only 01/05/2015. 01/01/2015 and 01/02/2015 date not selected it is wrong. Its should be select the 01/01/2015 and 01/02/2015 date, means it should be select total 12/25/2014 to 01/05/2015 , not select the 2 extra column in calender.
          Attach the screen shot of Application. Please see it.


I using Rad Scheduler coding like-

<telerik:RadScheduler runat="server" ID="rscCalender"  
            
          GroupBy="ProjectID" GroupingDirection="Vertical"  
            DataSourceID="EventsDataSource" 
            DataKeyField="ProjectID"
            DataSubjectField="Stage" 
             FirstDayOfWeek="Monday" LastDayOfWeek="Friday"
              DataStartField="Phase_Start_Date" DataEndField="Phase_End_Date"
             SelectedView="MonthView" OnTimeSlotCreated="rscCalender_TimeSlotCreated"
            OnAppointmentInsert="rscCalender_AppointmentInsert" OnAppointmentUpdate="rscCalender_AppointmentUpdate" AllowDelete="false" AllowEdit="false" AllowInsert="false" >

            <MonthView FirstDayHeaderDateFormat="''d''" />
            
            <AdvancedForm Modal="false"></AdvancedForm>
           
            <ResourceHeaderTemplate >
                <asp:Panel ID="ResourceImageWrapper" runat="server">               
                    <asp:LinkButton ID="lnkProjectName" runat="server" ></asp:LinkButton>
                </asp:Panel>
            </ResourceHeaderTemplate>
            <ResourceTypes>
                <telerik:ResourceType KeyField="BuildID" Name="ProjectID" TextField="ProjectName" ForeignKeyField="BuildID"
                 DataSourceID="ProjectSource"  ></telerik:ResourceType>
            </ResourceTypes>
          <DayView  UserSelectable="false"/>
   
            <WeekView UserSelectable="false" />
    <TimelineView  UserSelectable="false"/>
        </telerik:RadScheduler>
Sangeeta
Top achievements
Rank 1
 answered on 09 Jan 2015
1 answer
117 views
Hi,

I am trying to achieve the following:

First fill a LightBox with three images and then three YT videos in iframes from code-behind with ItemTemplate.InstantiateIn.
The image and video items are created but clicking the Prev/Next buttons results in a full page postback when I get to the video items.

Do you think it is possible to create a LightBox with such content?

Thanks,
Marc
Kostadin
Telerik team
 answered on 09 Jan 2015
6 answers
68 views
The file format drop down on the export dialog opens up under the main dialog body rather than over it.

It also doesn't close on its own when the main dialog is closed.

Running IE 11 on Win 7, occurred both with and without compatibility mode enabled.
Vessy
Telerik team
 answered on 09 Jan 2015
1 answer
168 views
I'm using a scatter chart to plot points some of which have the same X and Y values. In this case only the last plotted point at that position is plotted and there is no indication that there are other points with the same values. Is there any way to slightly offset points that have the same X and Y values so that all are visible?

Thanks
Danail Vasilev
Telerik team
 answered on 09 Jan 2015
3 answers
48 views
Here is my code so, far, I am trying to understand how to identify what RadPanelItem was clicked and fire the OnClientItemClickedEvent accordingly.
My application is to toggle map layers on or off depending on what PanelItem is clicked however I can't seem to figure out how to iterate the PanelItems and toggle the Layers accordingly.

BONUS:  How do add a check box or some other UI to each PanelItem to indicate if the Item is toggled on or off?

Any help would be appreciated.

Thanks.

01.<script type="text/javascript">
02.        var geocoder;
03.        var layers = [];
04. 
05.        layers[0] = new google.maps.KmlLayer('OfficeLocations.kml',
06.        { preserveViewport: true });
07. 
08.        layers[1] = new google.maps.KmlLayer('http://www.geocodezip.com/geoxml3_test/utah-hunt_com_DeerSouthern_kml.xml',
09.        { preserveViewport: true });
10. 
11.        layers[2] = new google.maps.KmlLayer('police.kml',
12.        { preserveViewport: true });
13. 
14.        layers[3] = new google.maps.KmlLayer('waste.kml',
15.        { preserveViewport: true });
16.        var map;
17. 
18.        function initialize() {
19.            geocoder = new google.maps.Geocoder();
20.            var mapOptions = {
21.                center: { lat: 44.0527524, lng: -80.1875065 },
22.                zoom: 11
23.            };
24.            map = new google.maps.Map(document.getElementById('map-canvas'),
25.                mapOptions);
26.        }
27. 
28.        function toggleLayers(i) {
29. 
30.            if (layers[i].getMap() == null) {
31.                layers[i].setMap(map);
32.            }
33.            else {
34.                layers[i].setMap(null);
35.            }
36.            document.getElementById('status').innerHTML += "toggleLayers(" + i + ") [setMap(" + layers[i].getMap() + "] returns status: " + layers[i].getStatus() + "<br>";
37.        }
38. 
39.        function codeAddress() {
40.            var address = document.getElementById("address").value;
41.            geocoder.geocode({ 'address': address }, function (results, status) {
42.                if (status == google.maps.GeocoderStatus.OK) {
43.                    map.setCenter(results[0].geometry.location);
44.                    marker.setPosition(results[0].geometry.location);
45.                    map.setZoom(14);
46.                }
47.                else {
48.                    alert("Geocode was not successful for the following reason: " + status);
49.                }
50.            });
51.        }
52. 
53.        google.maps.event.addDomListener(window, 'load', initialize);
54. 
55.    </script>
56.<script>
57. function OnClientItemClicked(sender, args) {
58. var item = args.get_item();   
59.    if (item.get_level() == 0) {   
60.      toggleLayers(0);    } 
61. }
62. </script>
63. <telerik:RadPanelBar ID="RadPanelBar1" runat="server" Width="300px" Skin="Silk" OnClientItemClicked="OnClientItemClicked">
64. <Items>
65. <telerik:RadPanelItem runat="server" Text="Government Services" Expanded="true" ImageUrl="images/icons/information.gif">
66. <Items>
67. <telerik:RadPanelItem runat="server" Text="Office Locations" ImageUrl="images/icons/building.gif">
68. </telerik:RadPanelItem>
69. <telerik:RadPanelItem runat="server" Text="Police Stations" ImageUrl="images/icons/shield.gif">
70. </telerik:RadPanelItem>
71. <telerik:RadPanelItem runat="server" Text="Waste Disposal" ImageUrl="images/icons/lorry.gif">
72. </telerik:RadPanelItem>
73. </Items>
74. </telerik:RadPanelItem>
75. </telerik:RadPanelBar>
Brett
Top achievements
Rank 2
 answered on 08 Jan 2015
4 answers
378 views
I have been trying to fix this for nearly a week now, and I am completely at a loss as to why this is not working. I am at my wits end and I need help.

I am creating a "Composite Control". Inside the CreateChildControls() method I have the following code...
'***************************************
' Clear The Controls Collection
'***************************************
Me.Controls.Clear()
 
'***************************************
' Create Container Panel(s)
'***************************************
Me._panelContainer = New Panel
With Me._panelContainer
    .ID = "panelMainContainer"
End With
 
'***************************************
' Create Message PlaceHolder
'***************************************
Me._phPlaceHolder = New PlaceHolder
With Me._phPlaceHolder
    .ID = "phPlaceHolder"
End With
 
'***************************************
' Add Controls Directly To Container
'***************************************
With Me._panelContainer.Controls
    '***************************************
    ' Add Message Placeholder
    '***************************************
    .Add(Me._phPlaceHolder)
 
    '***************************************
    ' Create AJAX Controls
    '***************************************
    If (Me.UseAjax) Then
        '***************************************
        ' Define RADAJAXLoadingPanel
        '***************************************
        Me._panelRADAjaxLoading = New RadAjaxLoadingPanel
        With Me._panelRADAjaxLoading
            .ID = "panelRADAjaxLoading"
            .Skin = "Default"
            .EnableSkinTransparency = True
            .BackgroundPosition = AjaxLoadingPanelBackgroundPosition.Center
        End With
 
        '***************************************
        ' Add Loading Panel
        '***************************************
        .Add(Me._panelRADAjaxLoading)
    End If
 
    '***************************************
    ' Add Control Design To Panel
    '***************************************
    .Add(Me.CreateControlDesign())
End With
 
'***************************************
' Add Main Panel Container To Base Control
'***************************************
Me.Controls.Add(Me._panelContainer)
 
'***************************************
' Call Base Class Method
'***************************************
MyBase.CreateChildControls()

The CreateControlDesign() method has the following code...
Private Function CreateControlDesign() As Control
    '***************************************
    ' Initialize Variables
    '***************************************
    Dim objTable_Main As CodeLibrary.HTMLTableBuilder
 
    '***************************************
    ' Default Values
    '***************************************
    Me._cboRoleGroups = New DropDownList
    Me._chkRoles = New CheckBoxList
    Me._cmdClearSelection = New LinkButton
    Me._lblTotalSelectedRoles = New Label
 
    '***************************************
    ' Initialize Controls
    '***************************************
    With Me._cboRoleGroups
        .ID = "cboRoleGroups"
        .AutoPostBack = True
    End With
    With Me._chkRoles
        .ID = "chkRoles"
        .AutoPostBack = True
    End With
    With Me._cmdClearSelection
        .ID = "cmdClearSelectedRoles"
        .Text = "Clear Selected Roles"
    End With
    With Me._lblTotalSelectedRoles
        .ID = "lblTotalSelectedRoles"
        .Text = "{0} Roles Selected"
    End With
 
    '***************************************
    ' Main Container Table
    '***************************************
    objTable_Main = New CodeLibrary.HTMLTableBuilder
    With objTable_Main
        '***************************************
        ' Set Table Properties
        '***************************************
        .Table.ID = "tblMain"
        If (Me.UseDNNFormItemClass) Then .Table.CssClass = "dnnFormItems"
 
        '***************************************
        ' Row: 01 (Role Group Selector)
        '***************************************
        .NewRow()
        With .CurrentRow
            '***************************************
            ' Cell 01: cboRoleGroups
            '***************************************
            objTable_Main.NewCell()
            With objTable_Main.CurrentCell
                '***************************************
                ' Set Cell Properties
                '***************************************
                If (Me.UseDNNFormItemClass) Then .CssClass = "dnnFormItem"
                .Width = New Unit(0, UnitType.Pixel)
 
                '***************************************
                ' Add Control(s) To Cell
                '***************************************
                .Controls.Add(Me._cboRoleGroups)
            End With
            objTable_Main.CommitCell()
 
            '***************************************
            ' Cell 02: Spacer
            '***************************************
            objTable_Main.NewCell()
            With objTable_Main.CurrentCell
                .Width = New Unit(10, UnitType.Pixel)
            End With
            objTable_Main.CommitCell()
 
            '***************************************
            ' Cell 03: lblTotalSelectedRoles
            '***************************************
            objTable_Main.NewCell()
            With objTable_Main.CurrentCell
                '***************************************
                ' Set Cell Properties
                '***************************************
                .Width = New Unit(100, UnitType.Percentage)
 
                '***************************************
                ' Add Control(s) To Cell
                '***************************************
                .Controls.Add(Me._lblTotalSelectedRoles)
            End With
            objTable_Main.CommitCell()
        End With
        .CommitRow()
 
        '***************************************
        ' Row: 02 (Clear Selection Button)
        '***************************************
        .NewRow()
        With .CurrentRow
            '***************************************
            ' Cell 01: Data Entry Control
            '***************************************
            objTable_Main.NewCell()
            With objTable_Main.CurrentCell
                '***************************************
                ' Set Cell Properties
                '***************************************
                If (Me.UseDNNFormItemClass) Then .CssClass = "dnnFormItem"
                .ColumnSpan = 3
 
                '***************************************
                ' Add Control(s) To Cell
                '***************************************
                .Controls.Add(Me._cmdClearSelection)
            End With
            objTable_Main.CommitCell()
        End With
        .CommitRow()
 
        '***************************************
        ' Row: 03 (Role Selector)
        '***************************************
        .NewRow()
        With .CurrentRow
            '***************************************
            ' Cell 01: Data Entry Control
            '***************************************
            objTable_Main.NewCell()
            With objTable_Main.CurrentCell
                '***************************************
                ' Set Cell Properties
                '***************************************
                If (Me.UseDNNFormItemClass) Then .CssClass = "dnnFormItem DCCRemoveLabelContraints"
                .ColumnSpan = 3
 
                '***************************************
                ' Add Control(s) To Cell
                '***************************************
                .Controls.Add(Me._chkRoles)
            End With
            objTable_Main.CommitCell()
        End With
        .CommitRow()
    End With
 
    '***************************************
    ' Return Final Value
    '***************************************
    Return objTable_Main.Table
End Function


In the CompositeControl's Page_Load() event, I have the following code...
'***************************************
' Register Controls w/ RADAJAXManager
'***************************************
If (Me.UseAjax) Then
    Dim objRADAjaxManager As RadAjaxManager = Me.RADAjaxManager
    If ((objRADAjaxManager IsNot Nothing) AndAlso (Me.Visible)) Then
        With objRADAjaxManager.AjaxSettings
            '***************************************
            ' Set AJAX Update Triggers
            '***************************************
            .AddAjaxSetting(Me._cboRoleGroups, Me._panelContainer, Me._panelRADAjaxLoading)
            .AddAjaxSetting(Me._cmdClearSelection, Me._panelContainer, Me._panelRADAjaxLoading)
            .AddAjaxSetting(Me._chkRoles, Me._panelContainer, Me._panelRADAjaxLoading)
            .AddAjaxSetting(Me._chkRoles, Me._chkRoles)
            .AddAjaxSetting(Me._chkRoles, Me._lblTotalSelectedRoles)
        End With
    End If
End If

When I use the control, everything renders fine on the initial load. When I update the value of any of the internal controls, I see the RADAJAXLoadingPanel appear for a second with the spinning circle as I expect to see. Then the loading panel vanishes and none of the internal control values update based on the code I have. I stepped through the code and the CheckBoxList is getting new values, and so is the label...but the changes are not being displayed.

Any ideas? Please help! This has been driving me nuts and is causing a significant delay in my development schedule.

-Ben
Ben
Top achievements
Rank 1
 answered on 08 Jan 2015
7 answers
265 views
Hello Telerik Team

How to find control inside Detail Template of RadTreeList in ItemCommand event of RadTreeList?
Finding on DataBound and ItemCreated will not work for requirement.

Thanks
Konstantin Dikov
Telerik team
 answered on 08 Jan 2015
5 answers
292 views
How do you start the slide show automatically on page load?
Pavlina
Telerik team
 answered on 08 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
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
Iron
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?