Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
121 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
136 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
121 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
97 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
486 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
167 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
187 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
83 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
7 answers
277 views
Dear Support , please advice ...
im creating a page like this  telerik demo :
http://demos.telerik.com/aspnet-ajax/window/examples/radwindowandmdi/defaultcs.aspx
using the same javascript code , even whit the
tabStrip.trackChanges();
and
tabStrip.commitChanges();
however i put a .net dropdownlist  whith a postback event ( to set a profile that i whant to get in new windows) , and everytime the dropdownlist do the postback AND i created a new tab ( javascript ) , i got an .net error OBJECT REFERENCE NOT SET ....

COULD SOME ONE PLEASE HELP ME ? what more should i so ?

thnks !

NullReferenceException: Referência de objeto não definida para uma instância de um objeto.]
   Telerik.Web.UI.NavigationItem.LoadFromDictionary(IDictionary`2 dictionary) +104
   Telerik.Web.UI.RadTab.LoadFromDictionary(IDictionary`2 dictionary) +19
   Telerik.Web.UI.ClientStateLogPlayer`1.Insert(ClientStateLogEntry entry, ControlItemCollection items, Int32 index) +105
   Telerik.Web.UI.ClientStateLogPlayer`1.Play(ClientStateLogEntry entry) +219
   Telerik.Web.UI.ClientStateLogPlayer`1.Play(IEnumerable`1 clientStateLogEntry) +135
   Telerik.Web.UI.RadTabStrip.LoadLogEntries(TabStripClientState state) +34
   Telerik.Web.UI.RadTabStrip.LoadClientState(TabStripClientState state) +40
   Telerik.Web.UI.RadTabStrip.LoadPostData(String postDataKey, NameValueCollection postCollection) +166
   Telerik.Web.UI.RadDataBoundControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13
   System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +690
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1743

 

Aneliya Petkova
Telerik team
 answered on 16 Jan 2014
2 answers
78 views

If i have GroupsDefaultExpanded="false" i Want to schow only 20 Group rows

I can set PageSize="20" but howe set GroupSize="20", Is it possible?

And if i expand the Group and if it is 47 items in the Group i want show all in same page, how?



Viktor Tachev
Telerik team
 answered on 16 Jan 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?