Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
131 views
Hi,
I am using a RadWindow to display the RadMediaPlayer. It all works fine until I close the RadWindow; the sound track from the YouTube clip keeps playing. How can I stop the YouTube clip completely when the RadWindow is closed?
Thanks
Rob
Rob
Top achievements
Rank 2
 answered on 16 Jan 2014
10 answers
174 views

Hi

i use Following code : (RadControls for ASP.NET Q3 2010)


                var oWindow = window.radopen(navigateUrl, null);
                oWindow.setSize(winWidth, winHeight);
                oWindow.set_title(winTitle);
                oWindow.add_pageLoad(function () { oWindow.set_status(" "); });
                oWindow.center();

and config of RadWindowManager :

            <telerik:RadWindowManager ID="RadWindowManager" runat="server"
                Skin="Vista" Behavior="Close, Move, Resize, Minimize, Maximize, Reload"
                OnClientClose="OnClientClose" Width="1280px" Height="1024px"
                VisibleStatusbar="true" RestrictionZoneID="fullheightcontainer"
                ShowContentDuringLoad="true" DestroyOnClose="true" MinimizeZoneID="MinimizeBar">
            </telerik:RadWindowManager>

this code work correctly on IE but when i use it in firefox , oWindow.setSize doesn't work
and show all window in Width="1280px" Height="1024px" resolution!!!!


==============================================================================

also i have a question about following script :

// Get instance from Parent RadWindowManager
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow)
        oWindow = window.radWindow;
    else if (window.frameElement.radWindow)
        oWindow = window.frameElement.radWindow;
    return oWindow;
}

function ShowModalWindow(navigateUrl, winWidth, winHeight, winTitle, setModal) {

    var oManager = GetRadWindow().get_windowManager();
    var oWindow = oManager.open(navigateUrl, null);

    // Set RadWindow Behaviors ClientSide
    // Close, Move, Resize, Reload
    oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close +
                            Telerik.Web.UI.WindowBehaviors.Move +
                            Telerik.Web.UI.WindowBehaviors.Resize +
                            Telerik.Web.UI.WindowBehaviors.Reload);

    oWindow.setSize(winWidth, winHeight);
    oWindow.set_title(winTitle);
    oWindow.add_pageLoad(function () { oWindow.set_status(" "); });
    oWindow.center();
    if (setModal == true) {
        oWindow.set_modal(true);
    }
    return false;
};

when i using this code i have an error :
"Microsoft JScript runtime error: 'Telerik.Web.UI.WindowBehaviors.Close' is null or not an object" :-(


how can i fix it , please help me
really thanks

Tom
Top achievements
Rank 1
 answered on 16 Jan 2014
3 answers
100 views
Hi,
We use the Telerik controls a lot and like the architecture. We need to create some controls and want to use your RadWebControl as base.
What is the easiest way to implement the JavaScript/ClientAPI and skinning. Do you have any examples or some documentation on it.
You have a class called SkinRegistrar. Is this the one to use ?

Regards
Ole Oscar Johnsen
Genady Sergeev
Telerik team
 answered on 16 Jan 2014
1 answer
117 views

Hey, I have a grid being created dynamically from a manually built pivot table with includes a variable number of columns and a variable number of rows.


I've gotten it to display statically quite easily, but what I would like to be able to do is replace the static numbers with a textbox containing the numeric value for each column for each view.  And then be able to iterate through those rows on a click event to save any changed data.


A visual of the gridview is attached.

Super simple code right now:
<telerik:RadGrid ID="RadGrid1" runat="server" OnItemCreated="RadGrid1_ItemCreated" >
   
    </telerik:RadGrid>

Code behind - all the hard work is done in creating a dynamic pivot table (dt):
RadGrid1.DataSource = dt;
RadGrid1.DataBind();


I've got code in the ItemCreated event to try to create a textbox, but this code is not working:
protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
       {
           if (e.Item is GridDataItem)
           {
               GridDataItem item = (GridDataItem)e.Item;
               DataRowView drv = (DataRowView)e.Item.DataItem;
 
               TextBox txt = new TextBox();
               txt.Text = drv[0].ToString();
               e.Item.Cells[0].Controls.Add(txt);
 
           }
       }


Thanks!!
Maria Ilieva
Telerik team
 answered on 16 Jan 2014
3 answers
105 views
Hi admin and all,

I have a rad grid with a check box in each row. whenever I change page or scroll, the checkboxes loose their selected state. How can I handle that?. Small additional information i am using virtual scrolling and virtual paging in radgrid.

This is an urgent requirement for me. Give reply as soon as possible.
Thanks and Regards,
Rod
Top achievements
Rank 1
 answered on 16 Jan 2014
1 answer
75 views
I currently have a window where Modal is set to true. I now want the window to not be modal. I have tried everything. I have cleared my cache, changed the property in the markup to false. I even set the property in PageLoad (){mywindowmanager.Modal = false}, but to no avail. The window will not change from being modal. Any ideas?
Raymond
Top achievements
Rank 1
 answered on 16 Jan 2014
11 answers
440 views
Hello,

I have a disabled radtextbox on my page and set its value at client site using JS API, set_value(), function. The value is not available through .Text property of the control at server side.

This used to work before, though we switched to .NET 4.0 version of the library and that may have something to do with this.

My ASPX is:
<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">   
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <telerik:RadTextBox runat="server" ID ="txtTelerik" Enabled="false" Width="400" ></telerik:RadTextBox>
    <asp:Button runat="server" ID="btnPost" Text="btnPost" />
     
    <br /><br /><asp:Label runat="server" ID="lblMessage"></asp:Label>
 
     
    <telerik:RadScriptBlock ID="radScriptBlock1" runat="server">
        <script language="javascript" type="text/javascript">
            function Init()
            {
                var ctrl = $find("<%=txtTelerik.ClientID %>");
                if (ctrl != null)
                    ctrl.set_value("Value lost upon postback");
            }
 
            Sys.Application.add_load(Init);
        </script>
    </telerik:RadScriptBlock>
</asp:Content>

Code Behind is:
Public Class _Default
    Inherits System.Web.UI.Page
 
    Private Sub btnPost_Click(sender As Object, e As System.EventArgs) Handles btnPost.Click
        lblMessage.Text = " Value after post = [" + txtTelerik.Text + "]"
    End Sub
End Class


Thanks
Richy
Top achievements
Rank 1
 answered on 16 Jan 2014
1 answer
146 views
Hello,

I have a radwindowmanager in a master page, with 2 radwindows defined, and an alert template, like so:

<telerik:RadWindowManager ID="myId" runat="server" ReloadOnShow="true"<br>
        OnClientShow="Hideloading" DestroyOnClose="true"><br>
        <AlertTemplate><br>
            <div class="rwDialogPopup radalert"><br>
                <div class="rwDialogText"><br>
                    <div class="space"><br>
                    </div><br>
                    <b>{1}</b><br>
                    <br /><br>
                    <a onclick="$find('{0}').close();FocusLastFocusedControl();" onkeypress="return GetChar(event,'{0}');"<br>
                        class="rwPopupButton" href="javascript:void(0);"><span class="rwOuterSpan"><span<br>
                            class="rwInnerSpan">##LOC[OK]##</span> </span></a><br>
                    <div class="clear"><br>
                    </div><br>
                </div><br>
            </div><br>
        </AlertTemplate><br>
        <Windows><br>
            <telerik:RadWindow ID="id1" AutoSize="true" Modal="true" Title="title1"<br>
                runat="server"  KeepInScreenBounds="true" VisibleStatusbar="false"<br>
                RegisterWithScriptManager="true" Behaviors="Close, Move, Resize" Height="450px"<br>
                OnClientBeforeShow="ClientShow" AutoSizeBehaviors="Height"><br>
                <ContentTemplate><br>
                    <%--  ... --%><br>
                </ContentTemplate><br>
            </telerik:RadWindow><br>
            <telerik:RadWindow ID="id2" AutoSize="true" Modal="true" ReloadOnShow="True"<br>
                 KeepInScreenBounds="true" VisibleStatusbar="false"<br>
                RegisterWithScriptManager="true" Behaviors="Move, Resize"<br>
                DestroyOnClose="true" runat="server" OnClientClose="CloseAddNoteWindow" Title="title2"><br>
                <ContentTemplate><br>
                    ...<br>
                </ContentTemplate><br>
            </telerik:RadWindow><br>
        </Windows><br>
    </telerik:RadWindowManager>



Now, from a client page I try to catch any error and show a message to the user via radalert by calling it from code-behind, like so:

RadWindowManager1.RadAlert(ex.Message, 450, 210,
                                                      ex.Message,
                                                      string.Empty);



What I'm trying to do is check if multiple radalerts are open, close them and show only one radalert with a generic message. I try to do this in the master page like this

Sys.Application.add_load(loadHandle);
 
            function loadHandle() {
                var wManager = GetRadWindowManager();
                var windows = wManager.get_windows();
                var wCount = windows.length;
                if (wCount > 3)
                {
                    //close all pop-ups and display a generic message pop-up about multiple errors
                    wManager.closeAll();
                    radalert('Multiple errors', null, null, 'Multiple errors');
                }
            }


The problem is that 'wManager.get_windows();' only contains the 2 RadWindows I have defined, and not the radalerts. Why is that? Is there some other way I can achieve what I want?
Marin Bratanov
Telerik team
 answered on 16 Jan 2014
0 answers
164 views
displaying google points using markers in java script and drawing line between all markers but problem is i want display one by one marker using set timer here is my code where should i write set time in my code please replay me thank you in advance  .


  var map;
       var myVar;
       var flightPlanArray = [];

       initialize();

       function initialize() {
       var markers = JSON.parse('<%#ConvertDataTabletoString() %>');
     
    
       var mapOptions = {
            center: new google.maps.LatLng(markers[0].Latitude, markers[0].Longitude),
            zoom: 5,
            mapTypeId: google.maps.MapTypeId.ROADMAP
       }

        map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
      
     
        for (i = 0; i < markers.length; i++) {
            data = markers[i]
            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
              });
             (function(map,  data) {
                for (var i = 0; i < markers.length; i++) {
                    data = markers[i]
                    
                    var myLatLng = new google.maps.LatLng(data.Latitude, data.Longitude);
                    var marker = new google.maps.Marker({
                        position: myLatLng,
                        map: map,

                    });
                    
                    //data=setInterval(function(data){initialize()},1000);
                   // function marker() {alert('Hi')}setTimeout(marker, 1000)
                    flightPlanArray.push(myLatLng);
                   
                  }iterator++;
                 
                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, data)
        }
     }

Vishwateja
Top achievements
Rank 1
 asked on 16 Jan 2014
1 answer
66 views

There are client APIs to know when data is being requested or when the user clicks the search button but I haven't found any examples of calling an external web service (using JQuery for example) and adding the search results using a client method. Does the search box support this?


The TreeView for example supports adding RadTreeViewNodes programmatically after querying an external "ado.net web service" as you call it in your documentation. I would like to be able to this with the RadSearchBox as well: manually query an external web service then add the results to the dropdown.

Dimitar Terziev
Telerik team
 answered on 16 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?