Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
238 views

I have some problem in RadTabStrip (and its related RadMultiPage)with Q1 and Q2.826 release…

Partial code for Delete Tab:

For close button:

        functiondeleteTab(tabText)

        {

        vartabStrip = $find("<%= RadTabStrip.ClientID%>");

        varmultiPage = $find("<%= RadMultiPage.ClientID%>");

        var tab =tabStrip.findTabByText(tabText.get_text());

        varpageView = tab.get_pageView();

        vartabToSelect = tab.get_nextTab();

           if(!tabToSelect)

               tabToSelect = tab.get_previousTab();

           tabStrip.get_tabs().remove(tab);

           multiPage.get_pageViews().remove(pageView);

           if(tabToSelect)

                tabToSelect.set_selected(true);          

        }

The close button for each Tab are working perfectly, itdeletes Tab and removes the corresponding PageView, please note that my tabsare multiple they can go from 1 to 10 tabs…

The problem is, let say I have 4 opened tabs (tab1, tab2,tab3 and tab4) and I close the tab2, tab3 and tab4 and only tab1 remains open(they will close perfectly) but then when I reopen tab4 “only” the tab2 andtab3 “or other previous close tabs” will reopen/reload also.

Is there any ways to correct this problem or prevent forreopening/reloading the already closed Tab and its corresponding PageView?

 

Thanks in advance!

Shawn Currie
Top achievements
Rank 1
 answered on 02 Oct 2009
3 answers
135 views
i know this is a silly question, but i have a splitter on a page and am trying to call a javascript function to scroll the splitter to the bottom on page load.

 

var splitter = $find("<%= RadSplitter1.ClientID %>");

always says splitter is null or not an an object.

What am i missing??

Thanks!

 

Tsvetie
Telerik team
 answered on 02 Oct 2009
1 answer
625 views

Hi there.

Environment: I am using Radcontrols for ASP.NET AJAX Q2 2009 SP1 with VStudio 2008 SP1.

I have a Rad Menu in Master Page with 3 Navigate Url's. Below are Master page Rad menu and 3 content pages.

I would like to do the following:

1) In the page load event of (
ContentPage1_for_MasterPage1), hide the Rad Menu Item#1 in Master Page.
(i.e hide this menu:  
<telerik:RadMenuItem Text="Go to ContentPage2_for_MasterPage1.aspx" NavigateUrl="~/ContentPage2_for_MasterPage1.aspx" >).

 

2) In the page load event of (ContentPage1_for_MasterPage1), Change Menu Item# 2 Text in Master page
(i.e Change this Menu Item (
<telerik:RadMenuItem Text="Go to ContentPage3_for_MasterPage1.aspx" NavigateUrl="~/ContentPage3_for_MasterPage1.aspx>)  Text to: “I am using Telerik Rad Controls”.

 

I know how to hide the Rad Menu Item in current page but just don’t know how to hide/change from
Content->Master Page. That’s what I am doing in current page:

 

protected void Page_Load(object sender, EventArgs e)

    {

       RadMenu1.FindItemByText("Go to ContentPage2_for_MasterPage1.aspx").Visible = false;

   

    }


Any Help will be appreciated. Thanks
 
Gc_0620
____________

Rad Menu in Master Page:

<telerik:RadMenu runat="server" ID="RadMenu1" Style="float: none; left: 0px; height: 20px; width:100%"

       Skin="Office2007">

                  <Items>

                        <telerik:RadMenuItem Text="MasterPage1 Test Menu">

                        <Items>

                            <telerik:RadMenuItem Text="Go To ContentPage1_for_MasterPage1.aspx" NavigateUrl="~/ContentPage1_for_MasterPage1.aspx">

                            </telerik:RadMenuItem>

                            <telerik:RadMenuItem Text="Go to ContentPage2_for_MasterPage1.aspx" NavigateUrl="~/ContentPage2_for_MasterPage1.aspx">

                            </telerik:RadMenuItem>

                              <telerik:RadMenuItem Text="Go to ContentPage3_for_MasterPage1.aspx" NavigateUrl="~/ContentPage3_for_MasterPage1.aspx">

                            </telerik:RadMenuItem>

                        </Items>

                    </telerik:RadMenuItem>

                  </Items>

            </telerik:RadMenu>


Content Page1:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="ContentPage1_for_MasterPage1.aspx.cs" Inherits="ContentPage1_for_MasterPage1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

You are in ContentPage1_for_MasterPage1.aspx..

</asp:Content>


Content Page2:


<%
@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="ContentPage2_for_MasterPage1.aspx.cs" Inherits="ContentPage2_for_MasterPage1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

You are in ContentPage2_for_MasterPage1.aspx..

</asp:Content>

Content Page3:

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage1.master" AutoEventWireup="true" CodeFile="ContentPage3_for_MasterPage1.aspx.cs" Inherits="ContentPage3_for_MasterPage1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

You are in ContentPage3_for_MasterPage1.aspx..

</asp:Content>

 

gc_0620
Top achievements
Rank 1
 answered on 02 Oct 2009
2 answers
99 views
Hi Folks!

I have a page that has a tabstrip with multipage functionality. The tabs and the pageviews are created dynamically. To keep track of what tab and corresponding pageview should be selected I created a variable that holds a counter. Everytime a tab and pageview are created, I increment the counter. I then use this counter value to select the current tab and pageview after a post (selectindex = counter value). This works fine if the tabs and their corresponding pageviews aren't deleted. Once I introduced the functionality of removing tabs and their corresponding pageviews with the use of client code, my counter is useless.

I thought about creating a hidden form field that can be used to store a value that will represent the counter. When a new tab and corresponding pageview are to be created, I would update the hidden form field to hold the incremented selected index. When the tab and corresponding pageview are to be removed, I would include in my javascript a process to remove one from the counter. The counter really represents a value the is used to set my "selectedindex".

Hope this isn't too confusing... I'm really looking for the proper solution to implememt the adding and removing of tabs with a corresponding pageview that have been created dynamically.

Thanks!
Shawn
Shawn Currie
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
118 views
Hi all,
I'm using RadControl Q2 2009, and now I'm developing DNN module with DNN compiled template proj for VS 2008, I want add RadCalendar into this DNN module, but I can't add RadScriptManger into this module for ajax.
Everybody can help me !?
Thnks so much.

hongnguyenx
Schlurk
Top achievements
Rank 2
 answered on 02 Oct 2009
2 answers
266 views
Hello,

I am using a RadGrid with clientside binding to a WCF service and it is not deselecting previously selected rows as the page changes.  I have written script to keep track of selected rows in JavaScript, but when changing pages, it keeps the row selected.  For example if I select row 3, and switch to the next page, the new row 3 is still selected.

What is the event that fires after data is bound on the client side.  I assume I can write a script to iterate over the grid's data and select and unselect rows.

Here is the code I have so far:
var selected = {};
        function RadGrid1_RowSelected(sender, args) {
            var ResourceKey = args.getDataKeyValue("resourceKey");
            if (!selected[ResourceKey]) {
                selected[ResourceKey] = true;
            }
            updateSelected();
        }
        function RadGrid1_RowDeselected(sender, args) {
            var ResourceKey = args.getDataKeyValue("resourceKey");
            if (selected[ResourceKey]) {
                selected[ResourceKey] = null;
            }
            updateSelected();
        }

Regards,
Josh
Joshua Owen
Top achievements
Rank 1
 answered on 02 Oct 2009
5 answers
332 views
Hi guys.
Im currently trying to fill a grid using webservice call.
The thing is a need to send an extra parameter to the webservice aside from the filters allowed by the grid.
Is there anyway of doing this?
Cheers

Radovan Radic
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
115 views
Hey, I'm sure this is a simple task, but I'm having a difficult time getting this to work.

The custom control will eventually be more complex.  I'm just trying to JAX the control before I begin really building it out.  However, I can't get the controlled JAX'ed nor the Loading Panel working.

All I want in the below sample is a .NET panel control with a label and button.  When the button is clicked, I put the thread to sleep for 2 seconds.  I want the click to be asyncronous and display a loading panel across the entire .NET panel.

Here's what I've got:

using System;  
using System.Collections.Generic;  
using System.Linq;  
using System.Text;  
using System.Web;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
namespace Elevate.UI.WebControls  
{  
    [ToolboxData("<{0}:SearchAjax runat=server></{0}:SearchAjax>")]  
    public class SearchAjax : Control, INamingContainer  
    {
        #region private properties  
          
        private Unit _width;
        #endregion  
 
        #region public accessors  
          
        public Unit Width  
        {  
            set { _width = value; }  
        }
        
        #endregion  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
            RadScriptManager scriptManager = new RadScriptManager();  
 
              
            Controls.Add(scriptManager);  
        }  
 
        protected override void CreateChildControls()  
        {  
 
            RadAjaxManager radAjaxManager = new RadAjaxManager();  
            AjaxSetting ajaxSetting = new AjaxSetting();  
            ajaxSetting.AjaxControlID = "button1";  
 
            AjaxUpdatedControl ajaxUpdatedControl = new AjaxUpdatedControl();  
            ajaxUpdatedControl.ControlID = "simplePanel";  
            ajaxUpdatedControl.LoadingPanelID = "ajaxLoadingPanel";  
 
            ajaxSetting.UpdatedControls.Add(ajaxUpdatedControl);  
            radAjaxManager.AjaxSettings.Add(ajaxSetting);  
 
            Controls.Add(radAjaxManager);  
 
            RadAjaxLoadingPanel radAjaxLoadingPanel = new RadAjaxLoadingPanel();  
            radAjaxLoadingPanel.ID = "ajaxLoadingPanel";  
            Controls.Add(radAjaxLoadingPanel);  
 
            Panel simplePanel = new Panel();  
            simplePanel.ID = "simplePanel";  
            simplePanel.Width = _width;  
            simplePanel.Attributes.Add("style""padding:50px;height:300px;");  
 
            Label lblTest1 = new Label();  
            lblTest1.Text = "Panel 1";  
            simplePanel.Controls.Add(lblTest1);  
 
            simplePanel.Controls.Add(new LiteralControl("<br /><br />"));  
 
            Button button1 = new Button();  
            button1.ID = "button1";  
            button1.Text = "Press Me";  
            button1.Click += new EventHandler(button1_Click);  
            simplePanel.Controls.Add(button1);  
 
            Controls.Add(simplePanel);  
 
 
        }  
 
        void button1_Click(object sender, EventArgs e)  
        {  
            System.Threading.Thread.Sleep(2000);  
        }  
    }  
 
}  
 
Thanks,
Joshua
Joshua
Top achievements
Rank 1
 answered on 02 Oct 2009
2 answers
72 views
I am not quite sure that if I want to host a web site in my own server (without telerik software installed): will it be able to display correctly?
I developed on my laptop which currently have telerik software installed.  I want to deploy my web now; however, it give me a error missing telerik namespace when try to view it. 

How would I solve this problem?  Is there any solution to fix this that you can link me or advice me?

Thanks
Urt
Top achievements
Rank 1
 answered on 02 Oct 2009
1 answer
144 views
Is there a way I can show one context menu for a radtreeview node that has child nodes and another context menu on nodes that have no child nodes?

I am pretty sure this will have to be done in Java and I am not a Jscript wizard.

I have tried :

<

 

telerik:RadTreeView ID="RadTreeView1" Runat="server" Skin="Office2007" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" >

 

 

<ContextMenus>

 

 

<telerik:RadTreeViewContextMenu Skin="Office2007" ID="MainContextMenu" runat="server" >

 

 

<Items>

 

 

<telerik:RadMenuItem Value="Expand" Text="Expand Descendants"></telerik:RadMenuItem>

 

 

<telerik:RadMenuItem Value="Collapse" Text="Collapse"></telerik:RadMenuItem>

 

 

</Items>

 

 

</telerik:RadTreeViewContextMenu>

 

 

 

</ContextMenus>

 

 

</telerik:RadTreeView>

 


and then on the treeview node bound event I am setting the contextmenuid per node.  This unfortunately has no effect and all nodes get this menu.

Any help would be appreciated.


Thanks,


Si


it-workz
Top achievements
Rank 1
 answered on 02 Oct 2009
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?