Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
130 views
I'm new for Kendo treeview. In kendo.MVC.Example template, we can set up treeview data source from the data generated from controller. If I want to for example click button, and get new data by ajax, how can I reload the data source for the treeview? 
Alex Gyoshev
Telerik team
 answered on 24 Jan 2014
0 answers
78 views
problem in display direction please replay me
     var map;
     var myVar;
     var flightPlanArray = [];
     var markerDispSize = 0;
     var directionDisplay;
     var directionsService = new google.maps.DirectionsService();
     initialize();

     function initialize() {
         var markers = JSON.parse('<%#ConvertDataTabletoString() %>');
       function pauseMarker() {
           directionsDisplay = new google.maps.DirectionsRenderer();
            var markersData = [];
             //alert("starting func outside if var size:" + markerDispSize + "array size:" + markers.length);
              if (markerDispSize < markers.length) {
                 markerDispSize = markerDispSize + 1;
                
                 markersData.push(markers[markerDispSize-1]);
                 var mapOptions = {
                     center: new google.maps.LatLng(markersData[0].Latitude, markersData[0].Longitude),
                     zoom:5,
                     mapTypeId: google.maps.MapTypeId.ROADMAP
                 }

                 map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
                 settingMarkers(markersData);

             }
            var start = document.getElementById("start").value;
            var end = new google.maps.LatLng(markersData.push(markers[markerDispSize+1]));
            var request = {
                origin:start,
                destination:end,
                travelMode: google.maps.DirectionsTravelMode.DRIVING
            };
          
            directionsService.route(request, function(response, status) {
                if (status == google.maps.DirectionsStatus.OK) {
                    directionsDisplay.setDirections(response);
                }
            });
          
            var endMarker = new google.maps.Marker({
                position: end,
                map: map,
            });
             
         } setInterval(pauseMarker,3000);

     }
     
     function settingMarkers(markersToSet) {
   
     for (i = 0; i < markersToSet.length; i++) {
             data = markersToSet[i];
             if (i == 0) {
                 var myLatlng = new google.maps.LatLng(data.Latitude, data.Longitude);
                 var image = 'images/YellowCar.png'
                 var marker = new google.maps.Marker({
                     position: myLatlng,
                     map: map,
                     icon: image
                 }); directionsDisplay.setMap(map);
             }


             (function (map) {
       
                     var myLatLng = new google.maps.LatLng(data.Latitude, data.Longitude);
                     var marker = new google.maps.Marker({
                         position: myLatLng,
                         map: map, icon: image
                     });
                     flightPlanArray.push(myLatLng);
                 drawFlightPlan(flightPlanArray);

                 /* Draw lines between all markers */
                 function drawFlightPlan(flightPlanCoordinates) {
                     var flightPath = new google.maps.Polyline({
                         path: flightPlanCoordinates,
                         geodesic: true,
                         strokeColor: "#ad1700",
                         strokeOpacity: 1.0,
                         strokeWeight: 2
                     });    
                      // To add the marker to the map, call setMap();
                     /* Bind the new flightPath to the map */
                     flightPath.setMap(map);
                     fitBounds(flightPlanCoordinates);
                 }
             })(map)
         }
     }
Vishwateja
Top achievements
Rank 1
 asked on 24 Jan 2014
0 answers
73 views

     var map;
     var myVar;
     var flightPlanArray = [];
     var markerDispSize = 0;
     var directionDisplay;
     var directionsService = new google.maps.DirectionsService();
     initialize();

     function initialize() {
         var markers = JSON.parse('<%#ConvertDataTabletoString() %>');
       function pauseMarker() {
           directionsDisplay = new google.maps.DirectionsRenderer();
            var markersData = [];
             //alert("starting func outside if var size:" + markerDispSize + "array size:" + markers.length);
              if (markerDispSize < markers.length) {
                 markerDispSize = markerDispSize + 1;
                
                 markersData.push(markers[markerDispSize-1]);
                 var mapOptions = {
                     center: new google.maps.LatLng(markersData[0].Latitude, markersData[0].Longitude),
                     zoom:5,
                     mapTypeId: google.maps.MapTypeId.ROADMAP
                 }

                 map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
                 settingMarkers(markersData);

             }
            var start = document.getElementById("start").value;
            var end = new google.maps.LatLng(markersData.push(markers[markerDispSize+1]));
            var request = {
                origin:start,
                destination:end,
                travelMode: google.maps.DirectionsTravelMode.DRIVING
            };
          
            directionsService.route(request, function(response, status) {
                if (status == google.maps.DirectionsStatus.OK) {
                    directionsDisplay.setDirections(response);
                }
            });
          
            var endMarker = new google.maps.Marker({
                position: end,
                map: map,
            });
             
         } setInterval(pauseMarker,3000);

     }
     
     function settingMarkers(markersToSet) {
   
     for (i = 0; i < markersToSet.length; i++) {
             data = markersToSet[i];
             if (i == 0) {
                 var myLatlng = new google.maps.LatLng(data.Latitude, data.Longitude);
                 var image = 'images/YellowCar.png'
                 var marker = new google.maps.Marker({
                     position: myLatlng,
                     map: map,
                     icon: image
                 }); directionsDisplay.setMap(map);
             }


             (function (map) {
       
                     var myLatLng = new google.maps.LatLng(data.Latitude, data.Longitude);
                     var marker = new google.maps.Marker({
                         position: myLatLng,
                         map: map, icon: image
                     });
                     flightPlanArray.push(myLatLng);
                 drawFlightPlan(flightPlanArray);

                 /* Draw lines between all markers */
                 function drawFlightPlan(flightPlanCoordinates) {
                     var flightPath = new google.maps.Polyline({
                         path: flightPlanCoordinates,
                         geodesic: true,
                         strokeColor: "#ad1700",
                         strokeOpacity: 1.0,
                         strokeWeight: 2
                     });    
                      // To add the marker to the map, call setMap();
                     /* Bind the new flightPath to the map */
                     flightPath.setMap(map);
                     fitBounds(flightPlanCoordinates);
                 }
             })(map)
         }
     }
Vishwateja
Top achievements
Rank 1
 asked on 24 Jan 2014
1 answer
202 views
Hi,

I've added some tabs to my instance of RadTabStrip and now I need to populate particular tab with HTML which I've got before via JQuery. How can I attach this HTML to the particular tab?
Shinu
Top achievements
Rank 2
 answered on 24 Jan 2014
5 answers
76 views
I recently answered a question in the forums, but didn't get any points.  I also don't see this listed in the Telerik points page anymore.

So, I just wanted to clarify if this has changed.

Thanks!
Rumen
Telerik team
 answered on 24 Jan 2014
1 answer
59 views

Hello

I cretated a new class CustomAppointment that inherits Appointment class.


 public class CustomAppointment : Appointment
    {
 
        public string LabelLeft;

        public string LabelRight;
      
       
......
}

and i want to show the appointments like this  
____________________________________________________
|       labelleft                               |                 labelright                    |
|_________________________|__________________________|

so when i tryed to show my CustomAppointment List  "Appointments" by setting the
AppointmentTemplate by ID :


  <AppointmentTemplate>

                        <div>
                            <h3 class="leftlabel">
                                <%#Appointments.Where(t=>t.ID == Container.Appointment.ID).FirstOrDefault().LabelLeft%>
                            </h3>
                        </div>
                       
                        <div>
                            <h3 class="rightlabel">
                                  <%#Appointments.Where(t=>t.ID == Container.Appointment.ID).FirstOrDefault().LabelRight%>
                            </h3>
                        </div>

         </AppointmentTemplate>


i found that    Container.Appointment.ID is empty while t.ID contains the value that i set it in !!

Any help Please !
Boyan Dimitrov
Telerik team
 answered on 24 Jan 2014
6 answers
976 views
i have two rad dropdownlists. onselectindex of first dropdown...the second one is getting filled. but the issue over here is:
second one is not getting filled properly and in edit mode the already present value of the second dropdown is not shown.
Please help...
<%--  category--%>
                                        <telerik:GridTemplateColumn DataField="category" HeaderText="Category" SortExpression="category"
                                            UniqueName="category">
                                            <EditItemTemplate>
                                                <telerik:RadDropDownList runat="server" ID="RadDropDownList3" DataTextField="category"
                                                    AutoPostBack="true" DataValueField="category" DefaultMessage="Select Category" SelectedValue='<%#Bind("category") %>'
                                                    OnSelectedIndexChanged="category_SelectedIndexChanged">
                                                    <Items>
                                                        <telerik:DropDownListItem Text="India" Value='India' />
                                                        <telerik:DropDownListItem Text="International" Value='International' />
                                                    </Items>
                                                </telerik:RadDropDownList>
                                                <%--  <telerik:RadDropDownList ID="RadDropDownList6" runat="server">
                                                </telerik:RadDropDownList>--%>
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="lblcategory" runat="server" Text='<%# Bind("category")%>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <%-- sub category--%>
                                        <telerik:GridTemplateColumn DataField="sub_category" HeaderText="Sub Category" SortExpression="sub_category"
                                            UniqueName="sub_category">
                                            <EditItemTemplate>
                                                <telerik:RadDropDownList runat="server" ID="RadDropDownList5" DataTextField="sub_category" SelectedValue='<%#Bind("sub_category") %>'
                                                    AutoPostBack="true" DataValueField="sub_category" DefaultMessage="Select Sub Category" RenderMode="Classic">
                                                </telerik:RadDropDownList>
                                                 <asp:HiddenField ID="hddlsubcategory" runat="server" Value='<%# Bind("sub_category") %>' />
                                            </EditItemTemplate>
                                            <ItemTemplate>
                                                <asp:Label ID="Label5" runat="server" Text='<%# Bind("sub_category")%>'></asp:Label>
                                            </ItemTemplate>
                                        </telerik:GridTemplateColumn>
 
 
 
and the code behind for this is:
 
 
protected void category_SelectedIndexChanged(object sender, DropDownListEventArgs e)
    {
 
 
        RadDropDownList RadDropDownList3 = sender as RadDropDownList;
        GridEditFormItem item = RadDropDownList3.NamingContainer as GridEditFormItem;
        //Use GridDataItem when dropdown is in item template
        //GridDataItem item = RadDropDownList3.NamingContainer as GridDataItem;
        RadDropDownList ddlsubcategory = item.FindControl("RadDropDownList5") as RadDropDownList;
 
        if (RadDropDownList3.SelectedValue == "India")
        {
            //FillCat1();
            ddlsubcategory.ClearSelection();
            ddlsubcategory.Items.Add(new DropDownListItem("North", "North"));
            ddlsubcategory.Items.Add(new DropDownListItem("East", "East"));
            ddlsubcategory.Items.Add(new DropDownListItem("West", "West"));
            ddlsubcategory.Items.Add(new DropDownListItem("South", "South"));
 
        }
        else if (RadDropDownList3.SelectedValue == "International")
        {
            ddlsubcategory.ClearSelection();
            ddlsubcategory.Items.Add(new DropDownListItem("Asia", "Asia"));
            ddlsubcategory.Items.Add(new DropDownListItem("Africa", "Africa"));
            ddlsubcategory.Items.Add(new DropDownListItem("Australia", "Australia"));
            ddlsubcategory.Items.Add(new DropDownListItem("America", "America"));
 
 
        }
 
 
 
    }
 
  protected void gvDetails_ItemDataBound(object sender, GridItemEventArgs e)
    {
 
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)
        {
            GridEditFormItem item = (GridEditFormItem)e.Item;
            //string value = item.GetDataKeyValue("ID").ToString();
            RadDropDownList sub_category = item.FindControl("RadDropDownList5") as RadDropDownList;
            HiddenField hsubcategory = item.FindControl("hddlsubcategory") as HiddenField;
 
            if (sub_category != null && hsubcategory != null)
            {
                sub_category.SelectedValue = hsubcategory.Value;
            }
        }
 
 
    }
    
    
Tanvi
Top achievements
Rank 1
 answered on 24 Jan 2014
1 answer
100 views
Hello,

I have a radgrid with drag and drop working perfectly. How can I make the drag function scroll the browser window if the drop location is not shown?

Thanks
Thomas
Viktor Tachev
Telerik team
 answered on 24 Jan 2014
11 answers
360 views
I've searched the forums, and this type of question seems to come up on occasion.

I'm developing a module for DNN and using the telerik controls.
I want to sell said module, such as on snowcovered.
I'm not going to be selling it for a thousand+, I was figuring a price < $100.
This has the potential of putting the telerik controls 'available' at 1/10th the cost if I do nothing different than I do with my own sites; I, of course, want to avoid this.
Anyway - I was wondering what I can do to secure the controls, perhaps something similar for the AJAX version that is available here for the ASP.NET version so that I can distribute a non-trial version with the module.

I sent an email to support@telerik.com requesting guidelines, but at about 40 hours after, I haven't gotten a response, so I'm bringing up licensing in the forums. :)

I've never done anything like this, and while the Instructions.doc that come with the source code may give all the required information to pull it off, I'm gonna need it in a slightly more step by step to make sure I don't miss something.

Things I'd like to get for this
1. Step by Step insctructions to 'bind' the DLL to my module
2. Pricing recommendations depending on 'binding' level

I know (based on previous posts) that Telerik isn't going to care if I give my module away with the trial DLL; nor will they particularly mind if I sell it for $2000 with the full version DLL

I think I'm missing something here... but I'll leave it at this for now.
Rumen
Telerik team
 answered on 24 Jan 2014
1 answer
96 views
Hi there

I'm trying to emulate some of your demo code from here: http://demos.telerik.com/aspnet-ajax/lightbox/examples/templates/defaultvb.aspx?#qsf-demo-source. When I close the Lightbox by clicking on the "X" on the top right and then click the same radbutton to launch it again, the page posts back before launching the lighbox again. Is there a way to switch this postback off?

Regards

Steven
Daniel
Telerik team
 answered on 24 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?