Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
91 views
I have a TreeView that loads child nodes through a webservice call when I expand by clicking or by calling .expand() on the node object in javascript.
I need to load (atleast sometimes) large number of child nodes and I would like to be able to quickly server the UI a list of parent nodes that are then by filled with childnodes through the webservice from JS on the client side.

So for example in the $.ready() event start loading childnodes for my tree without expanding them.

The reason is that i have a filter box that searches the treeview structure and therefore I need all the nodes but I dont want to take the performance hit at the first rendering.

Is it possible to call a method like (psuedo) .load_from_webservice() on the Node client objects?
Wendelstam
Top achievements
Rank 1
 answered on 11 Mar 2013
3 answers
148 views
Is there a client API to define custom webServiceLoaders/webServiceSettings?

I'm trying to Dynamically load content from an AJAX call which returns an entire Serialized RadMenu or a refresh of specific sub-menues.

are there any Client APIs to simply say

var items = menu.get_items();
items.clear();
items.loadXml(UrlToRestService);

and

var items = menu.findItemByText("My Dirty Dynamic Menu").get_items();
items.clear();
items.loadXml(UrlToSubMenuSpecificRestService);



I can add my own prototype method to create this API, but I would like to know if anything like this already exists.
Thanks.
Genady Sergeev
Telerik team
 answered on 11 Mar 2013
8 answers
174 views
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    This is the first page.<br />
            <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Default2.aspx">Go to page with combobox</asp:HyperLink>
  
    </div>
    </form>
</body>
</html>
  
  
  
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>
  
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
    <div>
            Hitting the Backspace key after selecting an item here will redirect back to Default
            <telerik:RadComboBox ID="RadComboBox1" runat="server">
            <Items>
                <telerik:RadComboBoxItem Value="0" Text="Item 0" />
                <telerik:RadComboBoxItem Value="1" Text="Item 1" />
                <telerik:RadComboBoxItem Value="2" Text="Item 2" />
                <telerik:RadComboBoxItem Value="3" Text="Item 3" />
            </Items>
            </telerik:RadComboBox>
    </div>
    </form>
</body>
</html>
I am sure this has been addressed before, but I couldn't find any reference for it. So, here is the problem I found: when an item in a radcombox is selected, if you hit the backspace key, you will be redirected to the previous page. Below is my code: Starting from Default.aspx page, click on the hyperlink to Default2.aspx; selecting any of the items in the Radcombobox, hit the backspace key and you go back to Default.aspx.

Hopefully, it would be a simple solution to fix this. Thanks.

Tri Nguyen

Hristo Valyavicharski
Telerik team
 answered on 11 Mar 2013
2 answers
98 views
Hi

I am trying to change the style of my headercontextmenu since it is transparent now on the RadGrid. How can i change this?

thanks

Dirk
Raj
Top achievements
Rank 1
 answered on 11 Mar 2013
1 answer
104 views
Hello,
I would like to update my language localization of GlobalResources from Q3/2012 to Q1/2013.
I found that original files RadColorPicker.resx, RadSocialShare.resx and RadWindow.resx are missing
in new Q1/2013 installation package. Are their contents moved to the other files?
Thanks
-Marian
Marin Bratanov
Telerik team
 answered on 11 Mar 2013
0 answers
98 views
Hi,

I want to do a search page with pagination that when I click on an item I get a new page with the detail information. On the detail page, I want to be able to press on a back to results button to back to the result page, or a back button to see the prior item, or a next button to see the next item of the search results.

What would be the best way to acheive that with the radgrid in the result page ?
What kind of datacontrol or databinding to persist the information across web pages ?

Thank you

Carl
Carl
Top achievements
Rank 1
 asked on 11 Mar 2013
3 answers
82 views
Hi,

I upgraded to the 2013 Q1 release today, excited for the new features, but experienced a pretty big bug.  Here is what I'm seeing:

  1. No problems with 2012.2.912 (most recent before 2013 Q1).
  2. Upgrade to 2013 Q1.
  3. On ItemDataBound and on ItemCommands, I'm unable to read "text" problem for grid columns via the following code.  In every case, even when data exists in the column, item("ColumnName").Text returns "&nbsp;".

Protected Sub TruckersRadGrid_ItemDataBound(ByVal sender As Object, ByVal e As GridItemEventArgs)
 
    If TypeOf e.Item Is GridDataItem Then
 
        Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
        Dim myFlowStepID As String = item("FlowStepID").Text

Protected Sub TruckersRadGrid_ItemCommand(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles TruckersRadGrid.ItemCommand
 
    Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
    Dim myPartyID As String = item("PartyID").Text

When I go back to the previous release, the problem solves itself.   Also, here is the resulting page in an error state:

https://gist.github.com/fastport/5103685

One more note: I believe if I set the visibility of the columns that need the "text" from, the procedures above can see the values.  But I haven't tested this thoroughly.  This is not the case with previous release.  The values are visible server side no problem.

Please let me know if anyone has any ideas what is up, because I am excited to have access to the new features.

Jim

Andrey
Telerik team
 answered on 11 Mar 2013
5 answers
138 views
Hello,

before this is my html code and vb.bet code:
<asp:Panel ID="PanelRadlist" runat="server" Width="700px">
<div style="font-family:Verdana; width:65" id="div_radlistview">
<telerik:RadListView ID="RadListView1" runat="server" DataKeyNames="idutente"
ItemPlaceholderID="Contenitore" AllowPaging="True" Skin="Office2010Silver"
Width="650px" OnPageIndexChanged="RadListView1_PageIndexChanged">
<LayoutTemplate>
<fieldset style="width: 700px; border:0px" id="FieldSet1">
<legend></legend>
<asp:Panel ID="Contenitore" runat="server">
</asp:Panel>
</fieldset>
</LayoutTemplate>
<ItemTemplate>
<div class="item">
<div class="image">
<asp:Image ID="Image1" runat="server" ImageUrl='<%# CType(Container.DataItem, PropertyUtente).imageprofile%>' Height="120px" Width="110px"/>
</div>
<div class="content">
<div class="user">
<b><%# CType(Container.DataItem, PropertyUtente).utente%></b>
</div>
<div class="description_category">
Categoria: <%# CType(Container.DataItem, PropertyUtente).Desccategoria%>
</div>
<div class="description_city">
Città: <%# CType(Container.DataItem, PropertyUtente).Desccomune%></div>
<div class="description_phone">
Telefono: <%# CType(Container.DataItem, PropertyUtente).Telefono%></div>
<div class="description_email">
Email: <%# CType(Container.DataItem, PropertyUtente).Email%>
</div>
<div class="item_button">
<telerik:RadButton ID="RadButton1" runat="server" Text="Visualizza biglietto completo" Width="170px" Skin="Office2010Silver"
OnClick="RadButton1_Click">
</telerik:RadButton>
</div>
</div>
</div>
</ItemTemplate>
</telerik:RadListView>
<telerik:RadDataPager ID="RadDataPager1" runat="server"
PagedControlID="RadListView1" Culture="it-IT" Width="700px">
<Fields>
<telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
<telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
</Fields>
</telerik:RadDataPager>
</div> <!-- end div radlist -->
</asp:Panel>

Imports System
Imports System.Web
Imports System.Data
Imports System.Data.SqlClient
Imports Telerik.Web.UI
Imports System.Web.UI.HtmlControls
Imports System.IO
Imports TRYcontact
 
Public Class search
    Inherits RadAjaxPage
    Private ObjUtente As New PropertyUtente
    Private Loadsearch As New GestoreUtente
    Private Sub Carica_risultati(ByVal _str1 As String, ByVal _str2 As String)
        Dim lista As List(Of PropertyUtente) = Loadsearch.Search(_str1, _str2)
        label1.text = "Risultati trovati: " & CInt(lista.Count)
        RadListView1.DataSource = lista
        RadListView1.DataBind()
    End Sub
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then
            Dim _str1, _str2 As String
            _str1 = Request.QueryString("_str1")
            _str2 = Request.QueryString("_str2")
            Carica_risultati(_str1, _str2)
            Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Height_Div();", True)
        End If
    End Sub
 
    Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs)
        Dim Button As RadButton = CType(sender, RadButton)
        Dim item As RadListViewDataItem = CType(Button.Parent, RadListViewDataItem)
        Dim dd As Integer = item.GetDataKeyValue("idutente")
        Response.Redirect("publicard.aspx?_id=" & item.GetDataKeyValue("idutente"))
    End Sub
 
    Protected Sub RadListView1_PageIndexChanged(sender As Object, e As Telerik.Web.UI.RadListViewPageChangedEventArgs) Handles RadListView1.PageIndexChanged
        RadListView1.CurrentPageIndex = e.NewPageIndex
        Dim _str1, _str2 As String
        _str1 = Request.QueryString("_str1")
        _str2 = Request.QueryString("_str2")
        Carica_risultati(_str1, _str2)
    End Sub
End Class
Digita il testo o l'indirizzo di un sito web oppure traduci un documento.
now the my problem is that  that when I click on the next button to go forward with the record, the selection of the next page is not the case still remains the number one and then if I click on button press or back first, the pages do not come back and you do not see the change records.
look at the picture I posted
And another question..it is possible that when I click on DataPage to change the page, being the property PageSize = 10, the display of the page to look back at the first record in high .. then come back as if the scrollbar on it ... like in google
i used this code: 

 

ScriptManager.RegisterStartupScript(Page, Me.GetType, "Goon", "window.scrollTo(0,0);", True)

but is only a refresh of Pgina and the scrollbar is always positioned at the bottom so the page does not return at the beginning of the list.




Kostadin
Telerik team
 answered on 11 Mar 2013
4 answers
244 views
Hi,
    I set initial content while page_loaded. After i change content i can see changes by clicking track changes button.
    But there is a scenerio like this.
    First user writes a content and saves.(xml, sql etc.)
    Second user opens saved content (Page_Load)
    Makes changes and saves again.
    First user opens document. User wants to see changes made by second user. 
    How?

    Thanks.
   
Rumen
Telerik team
 answered on 11 Mar 2013
6 answers
160 views
Hi,
I have aspx page it has usercontrol, radwindow,  and inside radwindow it has radrotator.
User control  has gridview when user click linkbutton inside gridview, I am showing radwindow as a popup.
When loading aspx page I am binding data to radrotator.

When user clicks link current item is not setting properly. 
But when the window is closed and reopened it works fine.
//aspx
<
telerik:RadWindowManager ID="RWM" Height="640px" Width="870px" ShowContentDuringLoad="false" ReloadOnShow="true" runat="server">
       <Windows>
         <telerik:RadWindow ID="RW_Detail" Localization-Restore="none" runat="server" Modal="True"
                    VisibleStatusbar="False" Behaviors="Close" Title="Deck Images" IconUrl="~/images/SmallLogo.jpg">
                    <ContentTemplate>
                        <div style="background-repeat: no-repeat; box-sizing: border-box; -moz-box-sizing: border-box;">
                            <div style="margin: 0 auto;">
                                <telerik:RadRotator ID="RadRotatorDetail" Height="525px" Width="850px" BorderColor="Transparent"
                                    ItemWidth="836px" BorderWidth="0" WrapFrames="false" RotatorType="Buttons" runat="server"
                                    ControlButtons-LeftButtonID="img_left" ControlButtons-RightButtonID="img_right" Skin="MetroTouch">
                                    <ItemTemplate>
                                        <div style="overflow-y: auto; height: 510px; width: 836px">
                                            <asp:Image ID="imgDetails" ImageUrl='<%# Eval("ID")+"\\"+Eval("ImageName")%>'
                                                SlideID='<%#Eval("ID") %>' runat="server" ImageAlign="Middle" />
                                            <br />
                                        </div>
                                    </ItemTemplate>
                                </telerik:RadRotator>
                            </div>
                            <div>
                                <div style="float: right;">
                                    <asp:Image ImageUrl="~/images/ticks/arrow_right.png" ID="img_right" AlternateText="right" runat="server"
                                        Style="margin: -10px 0px; cursor: pointer;" />
                                </div>
                                <div style="float: left">
                                    <asp:Image ImageUrl="~/images/ticks/arrow_left.png" ID="img_left" AlternateText="left" runat="server"
                                        Style="margin: -10px 0px; cursor: pointer;" />
                                </div>
                            </div>
                        </div>
                        <br />
                    </ContentTemplate>
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
//Inside Aspx.cs
MainDetails mDetails = new MainDetails();
DataSet ds = mDetails.Get_Details(m_ID, false) as DataSet;
RWM.Shortcuts.Add("Close", "Esc");
RadRotatorDetail.DataSource = ds;
RadRotatorDetail.DataBind();
<asp:TemplateField HeaderText="More Detail">
<ItemTemplate>
<asp:LinkButton ID="LB" runat="server" OnClientClick=<%# "Show_Window('" + Eval("ID") +"'); return false;" %>
                     Text='<%# Eval("Pro_Name") %>'></asp:LinkButton>
</ItemTemplate>
<ControlStyle Font-Bold="False" ForeColor="#003399" />
     <ItemStyle HorizontalAlign="Justify" />
</asp:TemplateField>
//javascript inside usercontrol.
<
script type="text/javascript">
    function Show_Window(ID) {
        var oManager = GetRadWindowManager();
        var oWnd = oManager.GetWindowByName("RW_S");
        var radRotator = GetRadRotator();
        var RadImgItems = radRotator.get_items();
   
ID = firstItem(ID);
        for (var name in RadImgItems) {
            if (ID == GetAttributeValue(RadImgItems[name], "SlideID")) {
                radRotator.set_currentItemIndex(RadImgItems[name].get_index(), false);
                radRotator.repaint();
            }
        }         
        oWnd.Show();
    }
    function firstItem(ID) {
        if (ID.indexOf(",") !== -1) {
            var firstItemName = ID.substring(0, ID.indexOf(","));
        }
        else
            firstItemName = ID;
        return firstItemName.trim();
    }
    function GetAttributeValue(item, name) {
        return $telerik.$(item.get_element()).find("img").attr(name);
    }
Am I missing something? How to force it to load correct index? In first popup it does goes through
 radRotator.set_currentItemIndex(RadImgItems[name].get_index(), false);

Best Regards,
Damdoar
Slav
Telerik team
 answered on 11 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?