Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
109 views
I have a user control with a RadListView, which contains a RadSlider and RadToolTip control like this:

<telerik:RadListView ID="myListView" runat="server" >
        <LayoutTemplate>
            <asp:Panel ID="RadListViewLayoutPanel" runat="server">
                <div class="container">
                    <asp:PlaceHolder ID="ItemPlaceHolder" runat="server"></asp:PlaceHolder>
                </div>
                <div class="slider">
                    <telerik:RadSlider ID="mySlider" runat="server" >
                    </telerik:RadSlider>
                    <telerik:RadToolTip ID="myToolTip" runat="server" Position="TopLeft" >
                    </telerik:RadToolTip>
                </div>
            </asp:Panel>
        </LayoutTemplate>
...
...

How do I find the ToolTip and Slider control in my JS? Note that I can't simple put the JS in the LayoutTemplate since this is a user control that lives on a page and for some reason the JS wouldn't get executed if I put in directly in the LayoutTemplate.

I was able to get the RadListView control by doing $find("<%=myUserControlThatHoldsTheListView.FindControl("myListView").ClientID %>") but how do I get the controls inside?

Thanks.

not
Top achievements
Rank 1
 answered on 04 Jan 2011
2 answers
58 views
 I have a grid in an ajaxpanel:

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="100%" Width="100%" LoadingPanelID="RadAjaxLoadingPanel1">
  
<table><tr><td valign="top">
  
<telerik:RadGrid ID="radGridABC" runat="server" Width="800px" AutoGenerateColumns="False" GridLines="None" OnItemDataBound="radGridABC_ItemDataBound" Skin="MainGrid" EnableEmbeddedSkins="false" PageSize="10" AllowPaging="true">
  
<PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
  
<ClientSettings EnableRowHoverStyle="true">
  
<Selecting AllowRowSelect="True" />
  
<ClientEvents OnRowSelecting="RowSelected" />
  
</ClientSettings>

After clicking the next page on pager, the page goes post back and loses the instance of grid. only this line remains:

<input id="radGridABC_ClientState" name="radGridABC_ClientState" type="hidden" autocomplete="off">

any ideas why??

Ersin
Top achievements
Rank 1
 answered on 04 Jan 2011
1 answer
74 views
I have a RadComboBox I am using ItemsRequested to populate the combobox with data that is filtered by the contents of another asp:TextBox control. So it is something like this:

<asp:TextBox runat="server" id="txtFilter" />
 
<telerik:RadComboBox runat="server" ID="rcbPCN" AllowCustomText="true" EnableLoadOnDemand="true"
                                 OnItemsRequested="rcbPCN_ItemsRequested"
                                 AutoPostBack="True" CausesValidation="False"
                                onselectedindexchanged="rcbPCN_SelectedIndexChanged" Filter="StartsWith" />
 
.... code behind:
 
        protected void rcbPCN_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
        {
                var query = PlanManager.QueryPlans().Where(q => q.bin == txtFilter.Text);
                rcbPCN.DataSource = query;
                rcbPCN.DataBind();
        }

The problem is that txtFilter.Text in the ItemsRequested event is only read the first time. After I delete the text from the RadComboBox, then change the text in txtFilter, then click the arrow on the combobox again, the results it shows me are from the original value of txtFilter.Text, not the newly changed value. How can I get around this? I need the combobox to always show a list of results that match the current value of txtFilter.Text.

thanks!
Brandon
Simon
Telerik team
 answered on 03 Jan 2011
2 answers
257 views
I have a page with an UpdatePanel containing a couple of dropdowns, a retrieve button, and a RadGrid. The idea is that the user would select a set of data using the dropdowns, and click the retrieve button.  This would then populate the grid, and the user would then be able to add/edit/delete the displayed data.

Simple enough, but there was a problem.  The user could click on the "Add New Record" button at the top of the grid, which would display the the insert record control, when the selection criteria in the dropdowns had not been set.  Clicking its "Inert" button would generate errors, because there were no selected values in the dropdowns.

My fast fix was to set "theGrid.Visible = False", and to make the grid visible only after the partial postback on the retrieve button.  With this change, the insert record worked, but the edit existing record did not.  When I clicked on the button in the GridEditCommandColumn, the little busy spinner spun, but the edit control was never displayed.  It looks as if the grid isn't being properly initialized, if it's not visible on initial page load.

In any case, changing it to "theGrid.Enabled = False" made everything work fine.
Jeff
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
152 views
I have 4 RadDocks ("RadDock1", "RadDock2", etc.) inside of RadDockZone1.  In the OnClientDockPositionChanged() function in Javascript, I would like to iterate through each RadDock in RadDockZone1.  How can I do this using a foreach loop, or another method?
Richard M
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
57 views

For some crazy (but i'm sure very simple) reason i cannot get this to work, any help would be appreciated.

<body>

    <form id="form1" runat="server">

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

    </telerik:RadScriptManager>

    <div>

        <telerik:RadToolTipManager ID="RadToolTipManager1" runat="server">

        </telerik:RadToolTipManager>

        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default">

        </telerik:RadAjaxLoadingPanel>

        <telerik:RadTreeView ID="TazaTree" runat="server">

        </telerik:RadTreeView>

        <br />

        <asp:Button ID="Button1" runat="server" Text="Button" />

    </div>

    <telerik:RadAjaxManager runat="server">

        <AjaxSettings>

            <telerik:AjaxSetting AjaxControlID="Button1">

                <UpdatedControls>

                    <telerik:AjaxUpdatedControl ControlID="TazaTree" />

                </UpdatedControls>

            </telerik:AjaxSetting>

        </AjaxSettings>

    </telerik:RadAjaxManager>

    </form>

</body>

 

 

 

 

 

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click

 

        Dim ReMan As New ReMan

        Dim REs As List(Of ReUltraObj) = ReMan.GetCompanyUltraREsByCity("1000", "San Jose")

 

        For Each RE As ReUltraObj In REs

            Dim RENode As New RadTreeNode

            RENode.Value = RE.REID.ToString

            RENode.Text = RE.Address

            TazaTree.Nodes.Add(RENode)

 

            RadToolTipManager1.TargetControls.Add(RENode.ClientID, RENode.Value, True)

        Next

 

    End Sub

 

    Protected Sub RadToolTipManager1_AjaxUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.ToolTipUpdateEventArgs) Handles RadToolTipManager1.AjaxUpdate

        Dim L As New Label

        L.Text = "test"

        e.UpdatePanel.ContentTemplateContainer.Controls.Add(L)

    End Sub

Sam
Top achievements
Rank 1
 answered on 03 Jan 2011
1 answer
62 views
Hello,
I have the following problem with my Update Panel and the Rad Grid.  When I perform a post back on the rad grid I get the following message directly above the Rad Grid.  "56|updatePanel|RadAjaxManager1SU|| ".

A snipet of the loading panel is as follows:
<rad:RadScriptManager runat="server" ID="radSM"></rad:RadScriptManager>  
       <rad:RadAjaxLoadingPanel ID="LoadingPanel" 
        CssClass="AjaxLoadingPanelBackground"
        runat="server"
        Transparency="10" >
        <div class="AjaxLoadingPanel" >
            <div style="font-family: Arial; font-size: 0.7em; font-weight: bold;">Loading...
            </div>
            <img src="I/loading.gif" alt="Loading.."/>
        </div>
    </rad:RadAjaxLoadingPanel
  
<asp:Panel ID="pnlSelectionList" runat="server" Height="285px" HorizontalAlign="Center" Width="1000px" Wrap="False">
                            <%--<asp:Panel ID="pnlGrid" runat="server" HorizontalAlign="Center" Width="100%"> --%>            
                                    <rad:RadAjaxManager ID="RadAjaxManager1" EnableAJAX="true" runat="server">
                                    <AjaxSettings>
                                        <rad:AjaxSetting AjaxControlID="RadGrid1">
                                            <UpdatedControls>
                                                <rad:AjaxUpdatedControl ControlID="pnlSelectionList" LoadingPanelID="LoadingPanel" />
                                                <rad:AjaxUpdatedControl ControlID="RadGrid1" />                                                                                                                                              
                                            </UpdatedControls>
                                        </rad:AjaxSetting>
                                    </AjaxSettings>
                                </rad:RadAjaxManager>                                                                                                   
                                <rad:RadGrid id="RadGrid1"
                                    EnablePostBackOnRowClick="false" 
                                    OnItemCreated="RadGrid1_ItemCreated"                                  
                                    OnPreRender="RadGrid1_PreRender"                                                                      
                                    ShowStatusBar="false" 
                                    runat="server" 
                                    AllowPaging="False" 
                                    AllowSorting="True"
                                    AllowMultiRowSelection="True" 
                                    AutoGenerateColumns="false"                                     
                                    ClientSettings-Resizing-ResizeGridOnColumnResize="false"                                    
                                    OnNeedDataSource="RadGrid1_NeedDataSource"
                                    EnableViewState="true"                                                                        
                                    Width="100%"   Height="92%"  Skin="Windows7" AllowFilteringByColumn="true"  EnableLinqExpressions="false">
                                    <MasterTableView PageSize="10" Width="95%" TableLayout="Fixed"  EnableViewState="true"  CommandItemDisplay="None">
                                        <Columns>                        
                                            <rad:GridTemplateColumn UniqueName="CheckBoxTemplateColumn"  
                                            HeaderStyle-Width="10%" 
                                            HeaderStyle-HorizontalAlign="Center" 
                                            AllowFiltering="false">
                                                <HeaderTemplate>
                                                 <asp:CheckBox id="headerChkbox" 
                                                    Text="Select All" 
                                                    OnCheckedChanged="ToggleSelectedState" 
                                                    AutoPostBack="True" 
                                                    runat="server"></asp:CheckBox>
                                                </HeaderTemplate>
                                                <ItemTemplate >
                                                    <asp:CheckBox id="CheckBox1" 
                                                    OnCheckedChanged="ToggleRowSelection" 
                                                    AutoPostBack="False" 
                                                    runat="server" 
                                                    Width="65"></asp:CheckBox>
                                                </ItemTemplate>
                                            </rad:GridTemplateColumn>
                                          </Columns>
                                    </MasterTableView>
                                    <ClientSettings EnableRowHoverStyle="true" 
                                                    Resizing-AllowColumnResize="true"
                                                    Resizing-AllowRowResize="false"  
                                                    Resizing-EnableRealTimeResize ="false" 
                                                    Resizing-ResizeGridOnColumnResize="false" 
                                                    Resizing-ClipCellContentOnResize ="false" 
                                                    EnablePostBackOnRowClick="false">                                                    
                                        <Scrolling AllowScroll ="true" UseStaticHeaders="true" />
                                        <ClientEvents OnColumnResized="OnColumnResized" />     
                                        <Selecting AllowRowSelect="true" />                                   
                                    </ClientSettings>
                                    <PagerStyle Mode="Slider"></PagerStyle>
                                </rad:RadGrid>

Any input is appreciated.
Thanks,
Pete
Pete
Top achievements
Rank 1
 answered on 03 Jan 2011
2 answers
71 views
I recently upgraded to the Q3 2010 version and noticed all my popup windows stopped working. What I found out was that when I open a window that has url arguments that are encoded, the radwindowmanager was decoding them when setting the url of the iframe. This caused my windows to break. For example, when I opened a dialog window I would pass it the path, an Id value and a url of where to redirect the parent page to. The the redirection url was encoded since it was a url itself. Here is an example:

/myproject/popups/page.aspx?id=1&url=%2fmyproject%2fotherpage.aspx%3fm%3dquestion%26id%3d
What happens is when the window opens, the IFrame's url is this instead:

/myproject/popups/page.aspx?id=1&url=/myproject/parentpage.aspx?m=question&id=
The encoded part of the query string has an "id=" parameter that interferes with the id value from the beginning of he query string. So in this scenario, I get a blank ID value on the server side since the ID is specified twice and the last one wins. I need the encoding to be preserved so these conflicts don't arise. Any suggestion how to fix this? This was working in previous versions before Q3. 

Jason Rodman
Top achievements
Rank 1
 answered on 03 Jan 2011
1 answer
163 views
We are using the Grid control from latest Q3 2010 build. The grid contains 100s of records and has over 20 columns that causes horizontal scroll in the grid to show up. That is fine. The issue is The browser scroll doesn't appear. So to scroll to last column, user has to scroll to the bottom of the page and move the horizontal grid scroll and again move up.

Attached is the image of bottom of the grid. You can see the grid scrollbar but there is no browser scroll bar.

How can we synch. the grid scroll with browser scroll so that user would use browser scroll without having to scroll down to use the grid scroll?

Thanks,
Mira
Telerik team
 answered on 03 Jan 2011
3 answers
89 views
I have noticed that grid saves its starte when it comes to :

* Filterexpression
* Sortexpression
* In edit/insert mode
* Wich page to go to

How can we reset viewstate? Why isn't this default behavior when binding new datasource?

//h
Vasil
Telerik team
 answered on 03 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?