Telerik Forums
UI for ASP.NET AJAX Forum
9 answers
1.7K+ views
Hi,

I'm trying to use the Image Manager and Hyperlink Manager with my editor.  It is working fine on my local development machine as well as my local QA server.  But, when I upload the project to my clients shared hosting environment I get a 404 on the 'Telerik.Web.UI.DialogHandler.aspx'.  The handler is set up correctly in the web.config as I used the smart tag to set it up and the hosting environment is not IIS 7.0 .

I've been trying to do some debugging in Firebug and found the 'Telerik.Web.UI.DialogHandler.aspx?checkHandler=true' returns a 200 status.

I haven't found a similar issue in the forums, so your assistance is very much appreciated.

Thanks.
Ivan Queiroz
Top achievements
Rank 1
 answered on 04 Mar 2010
4 answers
148 views
Is there a way to have multiple DetailTables in a RadGrid control align horizontally instead of vertically?
I want DetailTable 2 to be next to DetailTable 1 instead of below it.

Thanks in advance.
Ken Miller
Top achievements
Rank 1
 answered on 04 Mar 2010
3 answers
112 views
Everything works perfectly on my development machine but when i post to my server it is only showing one submenu item...here is my code from my masterpage file:

 

<telerik:RadScriptManager ID="RadScriptManagerMaster" runat="server">
</telerik:RadScriptManager>

 

<telerik:RadMenu id="RadMenu1" runat="server" BorderStyle="None" BorderWidth="0px"

 

 

 

EnableEmbeddedSkins="False" EnableTheming="False" Flow="Vertical" Height="259px" Width="205px">

 

 

 

<Items>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/images/menu_home_2.gif"

 

 

 

ImageUrl="~/images/menu_home_1.gif" NavigateUrl="~/Default.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_aboutus_2.gif"

 

 

 

ImageUrl="~/Images/menu_aboutus_1.gif" NavigateUrl="~/AboutUs.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_announcements_2.gif"

 

 

 

ImageUrl="~/Images/menu_announcements_1.gif" NavigateUrl="~/Announcements.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_departments_2.gif"

 

 

 

ImageUrl="~/Images/menu_departments_1.gif" >

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_fiscal_2.gif"

 

 

 

ImageUrl="~/Images/menu_fiscal_1.gif" NavigateUrl="~/FiscalAdministration.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_links_2.gif"

 

 

 

ImageUrl="~/Images/menu_links_1.gif" NavigateUrl="~/PartnerLinks.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

<telerik:RadMenuItem runat="server" HoveredImageUrl="~/Images/menu_contact_2.gif"

 

 

 

ImageUrl="~/Images/menu_contact_1.gif" NavigateUrl="~/ContactUs.aspx">

 

 

 

</telerik:RadMenuItem>

 

 

 

</Items>

 

 

 

<ExpandAnimation Type="Linear" />

 

 

 

</telerik:RadMenu>

then i create the subitems of one of the menu items from the code behind of my master page:
 

 

 

 

Try 

 

 

cmd.CommandText = ("SELECT fldID,fldName FROM Departments ORDER BY fldOrder,fldName")

 

 

cmd.Connection = DBConn

DBConn.Open()

DR = cmd.ExecuteReader()

 

While DR.Read

 

 

 

    Dim menuItem As New Telerik.Web.UI.RadMenuItem

 

 

 

    MenuItem.NavigateUrl = "Dept_About.aspx?deptid=" & DR("fldID")

 

 

    MenuItem.ImageUrl =

"Images/menu_" & DR("fldID") & "_1.gif"

 

 

 

 

   MenuItem.HoveredImageUrl = "Images/menu_" & DR("fldID") & "_2.gif"

 

 

 

 

   MenuItem.Visible = True

 

 

 

 

   Me.RadMenu1.Items(3).Items.Add(MenuItem)

 

 

E

nd While

 

 

 

 

DR.Close()

 

 

 

Me.RadMenu1.Items(3).Visible = True

 

 

 

 

   Catch ex As Exception

 

 

    lblCompanyName.Text = ex.ToString

 

 F

inally

 

 

 

 

 

DBConn.Close()

 

 

 E

nd Try

 

 

 

 

 

All of the images are on the server and my development machine..and they are using the same database table...on my development machine, it shows all 7 submenu items but on the server machine it only shows the last one as you can see here:  trpdd.comptechweb.com

any help is much appeciated.

 

 

Yana
Telerik team
 answered on 04 Mar 2010
11 answers
342 views
Okay here goes.
I can't seem to obtain a ref to any of my input settings on the client via the input manager.

Here's what I'm seeing in my intellisense

-        $find('RadInputManager').get_inputSettings()    {...}    Object
  •         [Methods]        
  •         RadInputManager_NumericSettings    null    Variant
  •         RadInputManager_TextSettings    null    Variant

Here's my markup:
     <%-- The following TextBox is required by the InputManager --%>  
    <asp:TextBox ID="TextBox1" runat="server" Visible="false" />  
         
    <telerik:RadInputManager ID="RadInputManager" runat="server" Skin="Vista"
        <telerik:NumericTextBoxSetting BehaviorID="NumericSettings" InitializeOnClient="true" Type="Number" DecimalDigits="1" GroupSizes="3" GroupSeparator="," PositivePattern="n" NegativePattern="-n">  
            <TargetControls> 
                <telerik:TargetInput ControlID="TextBox1" /> 
            </TargetControls> 
        </telerik:NumericTextBoxSetting> 
        <telerik:TextBoxSetting BehaviorID="TextSettings" InitializeOnClient="true"  > 
            <TargetControls> 
                <telerik:TargetInput ControlID="TextBox1" /> 
            </TargetControls> 
        </telerik:TextBoxSetting> 
    </telerik:RadInputManager> 

Ideally I'd like to be able to do this
                var numericSettings = $find('RadInputManager').get_inputSettings('NumericSettings'); 
                Array.forEach(elements, function(element) { 
                    numericSettings.addTargetInput(element.id); 
                });

I've since also tried the following to see if using this technique would grant me access to the input settings on the client but the settings remain null. I assume both the techniques I've presented here pretty much evaluate to the same thing.
    <script runat="server">   
          
            void Page_Init(object sender, EventArgs e){  
                RadInputManager input = new RadInputManager();  
                input.ID = "RadInputManager1";  
                input.Skin="Vista";  
                NumericTextBoxSetting numSet = new NumericTextBoxSetting();  
                numSet.BehaviorID = "NumericSettings";  
                input.InputSettings.Add(numSet);  
                input.InputSettings[0].TargetControls.Add(new TargetInput(TextBox1.UniqueID, true));  
                this.Page.Form.Controls.Add(input);  
            }  
       
</script>   


Cheers.
Dimo
Telerik team
 answered on 04 Mar 2010
2 answers
110 views
 function showPopupForm() {  
        var grid = $find("<%= RadGrid1.ClientID %>");  
        var masterTableView = grid.get_masterTableView();  
        var row = masterTableView.get_selectedItems()[0];  
        var dataKeyValue = masterTableView.get_selectedItems()[0].getDataKeyValue("ean");  
        window.radopen("EditFormCS.aspx?Ean=" + dataKeyValue, "UserListDialog");  
    }  

I hope someone can help with the above. The script runs in my app with no errors - but the dataKeyValue returns NULL

The below code works on the Server Side:-

For Each item As GridDataItem In RadGrid_detail.SelectedItems 
             
            Response.Write(item("ean").Text.ToString()) 
             
            Dim ID As String = item.GetDataKeyValue("ean") 
 
        Next 

I am trying to use the Client rather than the Server to return the multiple selected values as I wish to save on round trips to the server.

Do I need some sort of ClientEvents to activate the above Java??

Any help would be Fantastic!!!

PS I am working with a Hierarchical Grid.


Marcus
Top achievements
Rank 1
 answered on 04 Mar 2010
1 answer
194 views
Hi,

I am using the Q3 release.

I simply want to keep the RadBinaryImage width to 50 pixels, no matter what the image is.

I am doing this -

 RadBinaryImage1.DataValue = bt
                RadBinaryImage1.Visible = True
                RadBinaryImage1.Width = 50
                RadBinaryImage1.ResizeMode = BinaryImageResizeMode.Fit
                RadBinaryImage1.DataBind()


but no matter what, the image (my test is about 400 px wide) will display full size. What am I doing wrong here?



Rosen
Telerik team
 answered on 04 Mar 2010
3 answers
107 views
I have been using the  Telerik.Web.UI.dll 2008.3.1105.20 in my project but some of the new features of telerik Controls are missing here.

For better UI and performance I need to Upgrade it to the Latest version but when I replace the dll and Xml file in the Bin directory to newer version my Sites UI is totally disturbed How do I handle it.

What is the right Process to Upgrade to the latest Version.
Daniel
Telerik team
 answered on 04 Mar 2010
1 answer
256 views
HI,

I am having some problems implementing a complex ajax solution into SharePoint and was hoping for some help. I am building a SharePoint webpart with several UserControls, some of which are in RadWindows, I have read several threads and have attempted several approaches, and still cant seem to get the technique hashed out.

Here is an example of what I am trying to do.

I have one main UserControl which Contains all the rest of the user controls.

ViewInitializer.ascx
<%@ Assembly Name="Remington.Sali.View, Version=1.0.0.0, Culture=neutral, PublicKeyToken=2261864871064238" %> 
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="SaliViewInitializer.ascx.cs" Inherits="Remington.Sali.View.Sali.SaliViewInitializer" %> 
<%@ Register Assembly="Telerik.Web.UI, Version=2009.3.1314.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %> 
<%@ Register TagPrefix="ctrl" TagName="RepActivitiesView" Src="ActivitiesView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="StudentSearchView" Src="StudentSearchView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="LeadInsertView" Src="LeadInsertView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="StudentActivitiesView" Src="StudentActivitiesView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="StudentMultipleInquiriesView" Src="StudentMultipleInquiryView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="StudentStateManagementView" Src="StudentStateManagementView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="StudentDetailsView" Src="StudentDetailsView.ascx" %> 
<%@ Register TagPrefix="ctrl" TagName="AddEditActivityView" Src="AddEditActivityView.ascx" %> 
 
<Telerik:RadSkinManager ID="TelRadSkinMngrMain" runat="server" Skin="Windows7" /> 
<Telerik:RadScriptManager ID="rsmSaliScriptManager" runat="server" EnablePartialRendering="true" /> 
<Telerik:RadAjaxManager ID="RadAjaxManager" runat="server" OnAjaxRequest="AjaxManager_AjaxRequest" > 
</Telerik:RadAjaxManager> 
 
<Telerik:RadCodeBlock ID="RadCodeBlock" runat="server">  
<script type="text/javascript">  
      
    function AjaxRequest(arguments) {  
        var ajaxManager = $find("<%= RadAjaxManager.ClientID %>");  
        ajaxManager.ajaxRequest(arguments);  
    }  
 
 
 
      
 
//    function showContent() {  
//        //hide loading status...  
//        document.getElementById("loading").style.display = 'none';  
 
//        //show content  
//        document.getElementById("content").style.display = 'block';  
//    }  
      
    function Init() {  
        if (document && document.getElementById) {  
            var divStudentInformation = document.getElementById("divStudentInformation");  
            var divRepActivities = document.getElementById("divRepActivities");  
            if (divStudentInformation && divRepActivities) {  
                divStudentInformation.style.display = "block";  
                divRepActivities.style.display = "none";  
            }  
 
//            window.onload = function() {  
//                showContent();  
//            }  
//              
//            //  
//              
//            document.write('<div id="loading">Loading... Please wait.</div>');  
//            document.getElementById("content").style.display = 'none';  
        }  
    }  
 
    function TelRadPnlBarLeftmenu_ClickHandler(sender, eventArgs) {  
 
        if (document && document.getElementById) {  
 
            var pbItemText = eventArgs.get_item().get_text();  
            var divStudentInformation = document.getElementById("divStudentInformation");  
            var divRepActivities = document.getElementById("divRepActivities");  
 
            if (divStudentInformation && divRepActivities) {  
 
                if (pbItemText == "Students") {  
                    divStudentInformation.style.display = "block";  
                    divRepActivities.style.display = "none";  
                }  
 
                if (pbItemText == "Activities") {  
                    divStudentInformation.style.display = "none";  
                    divRepActivities.style.display = "block";  
                }  
 
                if (pbItemText == "Lead Insert") {  
 
                    var oWnd = $find("<%=TelRadWindowAddLead.ClientID%>");  
                    oWnd.show();    
                    //window.radopen(null, "TelRadWindowAddLead");  
                }  
 
            }  
        }  
    }  
 
    function CloseLeadInsertForm() {  
        var oWnd = $find("<%=TelRadWindowAddLead.ClientID%>");  
        oWnd.close();  
    }  
 
    function CloseAddEditActivityForm() {  
        var oWnd = $find("<%=AddActivityWIndow.ClientID%>");  
        oWnd.close();  
    }  
 
    function StudentActivitiesToolBar_ClickHandler(sender, eventArgs) {  
        //If you open the window by javascript, you will need to  
        //cancel the postback event and to execute the javascript:  
 
        var commandName = eventArgs.get_item().get_commandName();  
 
        //Checks which item is clicked  
        if (commandName == "AddActivity") {  
              
            // Open Window  
            var oWnd = $find("<%=AddActivityWIndow.ClientID%>");  
            oWnd.show();  
 
            AjaxRequest('InitAddEditActivityForm')  
              
        }  
 
    }     
      
      
 
    </script> 
</Telerik:RadCodeBlock> 
 
 
 
<div id="content">  
<div id="DivSaliMain" runat="server" style="height: 600px; width: 100%;">  
    <Telerik:RadToolBar ID="TelRadToolBarAdmin" CssClass="fontMenuSuper" runat="server" 
        Orientation="Horizontal" Width="100%" Height="30px" Style="z-index: 90001">  
        <Items> 
            <Telerik:RadToolBarButton ID="RadToolBarBtn" runat="server" Text="Rep Select">  
                <ItemTemplate> 
                  <div style="text-align:right;">  
                    <Telerik:RadComboBox ID="ddlAdminSelectRep" AutoPostBack="true" Visible="false" runat="server" 
                        OnSelectedIndexChanged="ddlAdminSelectRep_OnSelectedIndexChanged">  
                    </Telerik:RadComboBox> 
                  </div> 
                </ItemTemplate> 
            </Telerik:RadToolBarButton> 
        </Items> 
    </Telerik:RadToolBar> 
    <Telerik:RadSplitter ID="TelRadSpltrMain" ResizeWithBrowserWindow="true" ResizeWithParentPane="true" 
        runat="server" Height="100%" Width="100%" ResizeMode="EndPane" RegisterWithScriptManager="true">  
        <Telerik:RadPane MaxWidth="220" MinWidth="125" ID="TelRadPnLeftMenu" runat="server" 
            Collapsed="false" Width="220px" Scrolling="None" Height="100%" BackColor="#CEDFF3">  
            <Telerik:RadPanelBar runat="server" ID="TelRadPnlBarLeftmenu" Width="100%" Height="100%" 
                ExpandMode="FullExpandedItem" BorderWidth="0px"   
                AllowCollapseAllItems="False" OnClientItemClicked="TelRadPnlBarLeftmenu_ClickHandler">  
                <Items> 
                    <Telerik:RadPanelItem Text="Students" Expanded="true" ImageUrl="~/Resources/Images/Students.gif" 
                        Height="95%">  
                        <Items> 
                            <Telerik:RadPanelItem> 
                                <ItemTemplate> 
                                    <Telerik:RadTreeView ID="RadTreeView1" runat="server">  
                                        <ContextMenus> 
                                            <Telerik:RadTreeViewContextMenu ID="FilterContextMenu" runat="server">  
                                                <Items> 
                                                    <Telerik:RadMenuItem Text="New Filter" /> 
                                                </Items> 
                                            </Telerik:RadTreeViewContextMenu> 
                                        </ContextMenus> 
                                        <Nodes> 
                                            <Telerik:RadTreeNode ImageUrl="~/Resources/Images/Filter.gif" Text="My Filters" ContextMenuID="FilterContextMenu">  
                                            </Telerik:RadTreeNode> 
                                        </Nodes> 
                                    </Telerik:RadTreeView> 
                                    <Telerik:RadTreeView ID="TelRadTreeViewFilters" runat="server" OnNodeClick="TelRadTreeViewFilters_OnNodeClick">  
                                        <Nodes> 
                                            <Telerik:RadTreeNode ImageUrl="~/Resources/Images/Item.gif" Text="My Leads" /> 
                                            <Telerik:RadTreeNode ImageUrl="~/Resources/Images/Item.gif" Text="Unassigned Leads" /> 
                                        </Nodes> 
                                    </Telerik:RadTreeView> 
                                </ItemTemplate> 
                            </Telerik:RadPanelItem> 
                        </Items> 
                    </Telerik:RadPanelItem> 
                    <Telerik:RadPanelItem Text="Activities" ImageUrl="~/Resources/Images/Calendar.gif" 
                        Height="95%">  
                        <Items> 
                            <Telerik:RadPanelItem> 
                                <ItemTemplate> 
                                    <Telerik:RadCalendar runat="server" ID="cldrActivityDateSelect" EnableMultiSelect="false" 
                                        OnSelectionChanged="cldrActivityDateSelect_OnSelectionChanged" AutoPostBack="true" /> 
                                    <br /> 
                                    <div style="text-align: center;">  
                                        <asp:Button ID="btnViewAllMyActivities" OnClick="btnViewAllMyActivities_Click" Text="All My Activities" 
                                            runat="server" /> 
                                    </div> 
                                </ItemTemplate> 
                            </Telerik:RadPanelItem> 
                        </Items> 
                    </Telerik:RadPanelItem> 
                    <Telerik:RadPanelItem Text="Lead Insert" Height="95%" Expanded="false" PreventCollapse="true" ImageUrl="~/Resources/Images/Students.gif">  
                    </Telerik:RadPanelItem> 
                </Items> 
            </Telerik:RadPanelBar> 
        </Telerik:RadPane> 
        <Telerik:RadSplitBar Font-Bold="True" ID="TelRadSplitBarLeftMenu" Width="100%" SkinID="Windows7" 
            runat="server" CollapseMode="Forward" RegisterWithScriptManager="true" EnableEmbeddedSkins="True" 
            Height="100%" EnableEmbeddedScripts="True" /> 
        <Telerik:RadPane ID="TelRadPnMain" RegisterWithScriptManager="true" runat="server" 
            Width="100%" Height="100%" Scrolling="None">  
            <div id="DivMainAppLoad" runat="server" style="height: 100%; width: 100%">  
                <div id="divStudentInformation">  
                  
                    <Telerik:RadSplitter RegisterWithScriptManager="true" ID="TelRadSplitterStudentInfo" 
                        ResizeWithBrowserWindow="true" runat="server" Height="100%" Width="100%" Orientation="Horizontal" 
                        ResizeWithParentPane="true" ResizeMode="EndPane">  
                        <Telerik:RadPane ID="TelRadPaneStudentInfoTop" runat="server" 
                            Collapsed="false" Width="100%" Height="100%" Scrolling="None">  
                            <ctrl:StudentSearchView ID="ctrlStudentSearchView" runat="server" /> 
                        </Telerik:RadPane> 
                        <Telerik:RadSplitBar ID="TelRadsplitbarStudentDetailItems"   
                            runat="server" CollapseMode="Forward" /> 
                        <Telerik:RadPane Height="100%" Width="100%" ID="TelRadPnStudentItems" RegisterWithScriptManager="true" 
                            runat="server" Scrolling="None" Collapsed="false">  
                            <Telerik:RadTabStrip runat="server" ID="TelRadTabStripStudentItems" SelectedIndex="0" 
                                MultiPageID="TelRadMultiPageStudentItems"   
                                OnTabClick="TelRadTabStripStudentItems_OnTabClick">  
                                <Tabs> 
                                    <Telerik:RadTab Text="Student Details">  
                                    </Telerik:RadTab> 
                                    <Telerik:RadTab Text="Activities">  
                                    </Telerik:RadTab> 
                                    <Telerik:RadTab Text="Inquiries">  
                                    </Telerik:RadTab> 
                                    <Telerik:RadTab Text="Admissions Tasks">  
                                    </Telerik:RadTab> 
                                </Tabs> 
                            </Telerik:RadTabStrip> 
                            <Telerik:RadMultiPage runat="server" ScrollBars="None" ID="TelRadMultiPageStudentItems" 
                                SelectedIndex="0" Height="370" Width="100%" RegisterWithScriptManager="true">  
                                <Telerik:RadPageView runat="server" ID="RadPageView1" Width="100%" Height="100%">  
                                    <ctrl:StudentDetailsView ID="ctrlStudentDetailsView" runat="server" /> 
                                </Telerik:RadPageView> 
                                <Telerik:RadPageView runat="server" ID="TelRadPageVwActivities" Width="100%" Height="100%">  
                                    <ctrl:StudentActivitiesView ID="ctrlStudentActivitiesView" runat="server" /> 
                                </Telerik:RadPageView> 
                                <Telerik:RadPageView runat="server" ID="TelRadPageVwMultInquirys">  
                                    <ctrl:StudentMultipleInquiriesView ID="ctrlStudentMultipleInquiriesView" runat="server" /> 
                                </Telerik:RadPageView> 
                                <Telerik:RadPageView runat="server" ID="TelRadPageVwStateManagement">  
                                    <ctrl:StudentStateManagementView ID="ctrlStudentStateManagementView" runat="server" /> 
                                </Telerik:RadPageView> 
                            </Telerik:RadMultiPage> 
                        </Telerik:RadPane> 
                    </Telerik:RadSplitter> 
                      
                </div> 
                <div id="divRepActivities">  
                    <ctrl:RepActivitiesView ID="ctrlRepActivitiesView" runat="server" /> 
                </div> 
            </div> 
        </Telerik:RadPane> 
    </Telerik:RadSplitter> 
</div> 
 
 
        <Telerik:RadWindow ID="TelRadWindowAddLead" runat="server" Modal="true" AutoSize="False" Behaviors="None" 
             Height="750" Width="550" Title="Lead Insert">  
            <contenttemplate> 
                <ctrl:LeadInsertView ID="ctrlLeadInsertView" runat="server" /> 
            </contenttemplate> 
        </Telerik:RadWindow> 
          
        <Telerik:RadWindow ID="AddActivityWIndow" runat="server" Modal="true" AutoSize="False" Behaviors="Close" 
             Height="750" Width="600" ReloadOnShow="true">  
            <ContentTemplate> 
                <ctrl:AddEditActivityView ID="ctrlAddEditActivityView" runat="server" /> 
            </ContentTemplate> 
        </Telerik:RadWindow> 
</div> 

Here is the code behind (ViewInitializer.ascx.cs) It's slimed down some to focus on the problem..
 
    public partial class SaliViewInitializer : System.Web.UI.UserControl  
    {  
 
        public void AjaxManager_AjaxRequest(object sender, AjaxRequestEventArgs e)  
        {  
                switch (e.Argument)  
                {  
                    case "InitAddEditActivityForm":  
 
                        AddEditActivityView ctrlAddEditActivityView =  
                            (AddEditActivityView)AddActivityWIndow.ContentContainer.FindControl("ctrlAddEditActivityView");  
 
                        ctrlAddEditActivityView.PreformOpenAddActivity(SessionData.Current.User.SelectedStaffId,  
                                                                       SelectedStudentId);  
                        break;  
                }  
        }   
 
 
       
 
        private void WireUpAjaxSettings()  
        {  
            RadAjaxManager AjaxManager = RadAjaxManager.GetCurrent(Page);  
            AddEditActivityView ctrlAddEditActivityView = (AddEditActivityView)AddActivityWIndow.ContentContainer.FindControl("ctrlAddEditActivityView");  
            Panel pnlAddEditActivity = (Panel)ctrlAddEditActivityView.FindControl("pnlAddEditActivity");  
            RadAjaxLoadingPanel lpnAddEditActivity = (RadAjaxLoadingPanel)ctrlAddEditActivityView.FindControl("lpnAddEditActivity");  
            RadToolBar StudentActivitiesToolBar = (RadToolBar)ctrlStudentActivitiesView.FindControl("StudentActivitiesToolBar");  
            AjaxManager.AjaxSettings.AddAjaxSetting(StudentActivitiesToolBar, pnlAddEditActivity, lpnAddEditActivity);  
 
        }  
 
 
        protected void Page_Load(object sender, EventArgs e)  
        {  
 
            if (SessionData.Current.User == null)  
            {  
                IStaffRepository staffRepo = RepositoryProvider.GetRepository<IStaffRepository>();  
                SessionData.Current.User = staffRepo.GetUserByAccountName(Environment.UserName);  
            }  
        }  
 
 
        protected void Page_Init(object sender, EventArgs e)  
        {  
            RadAjaxManager AjaxManager = new RadAjaxManager();  
            AjaxManager.ID = "SaliRadAjaxManager";  
            AjaxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(AjaxManager_AjaxRequest);  
            Page.Controls.Add(AjaxManager);  
 
            ctrlStudentSearchView.StudentSelected += new EventHandler<SelectStudentEventArgs>(ctrlStudentSearchView_StudentSelected);  
        }  
 
        protected void Page_PreRender(object sender, EventArgs e)  
        {  
            WireUpAjaxSettings();  
 
            if (!Page.IsPostBack)  
            {  
                if (SessionData.Current.User.Roles.Contains(UserRoles.Administrator))  
                {  
                    ILookUpRepository lookupRepo = RepositoryProvider.GetRepository<ILookUpRepository>();  
                    RadToolBarItem textItem = TelRadToolBarAdmin.FindItemByText("Rep Select");  
                    RadComboBox ddlAdminSelectRep = (RadComboBox)textItem.FindControl("ddlAdminSelectRep");  
                    ddlAdminSelectRep.Visible = true;  
                    ddlAdminSelectRep.DataSource = lookupRepo.GetNonAdminRemingtonStaff();  
                    ddlAdminSelectRep.DataValueField = "Id";  
                    ddlAdminSelectRep.DataTextField = "Code";  
                    ddlAdminSelectRep.DataBind();  
                    RadComboBoxItem li = new RadComboBoxItem(SessionData.Current.User.UserName, SessionData.Current.User.StaffId.ToString());  
                    ddlAdminSelectRep.Items.Insert(0, li);  
                    ddlAdminSelectRep.SelectedIndex = 0;  
                }  
 
                if (!Page.ClientScript.IsStartupScriptRegistered("Init"))  
                {  
 
                    Page.ClientScript.RegisterStartupScript  
                        (this.GetType(), "Init""Init();"true);  
 
                }  
            }  
        }  
 
     }  
 

Now within this user control I have Two other user controls, One trying to update the other. StudentActivitiesView.ascx trying to update AddEditActivitiesView.ascx.

Here is the StudentActivitiesView.ascx
<Telerik:RadAjaxLoadingPanel ID="lpnStudentActivities" runat="server" /> 
 
<asp:Panel ID="apnStudentActivities" runat="server">  
 
<Telerik:RadToolBar ID="StudentActivitiesToolBar" RegisterWithScriptManager="true"   
                    runat="server" Width="100%" Height="30px" OnClientButtonClicked="StudentActivitiesToolBar_ClickHandler">  
                    <Items> 
                        <Telerik:RadToolBarButton id="TelRadToolBarBtnAddActivity" Enabled="True" runat="server" 
                            Text="Add Activity" CommandName="AddActivity">  
                        </Telerik:RadToolBarButton> 
                    </Items> 
                </Telerik:RadToolBar> 
 
      
<Telerik:RadGrid RegisterWithScriptManager="true" AllowPaging="true" AllowSorting="true" 
    ID="TelRadGridActivities" OnNeedDataSource="TelRadGridActivities_OnNeedDtaSrc" 
    PageSize="4" VirtualItemCount="4" AutoGenerateColumns="false" runat="server" 
    Width="100%" Height="69">  
            
           Grid COde Here....  
 
</Telerik:RadGrid> 
</asp:Panel> 

AddEditActivitiesView.ascx
<Telerik:RadAjaxLoadingPanel ID="lpnAddEditActivity" runat="server" /> 
<asp:Panel ID="pnlAddEditActivity" runat="server">  
<center> 
        <div class="ModalWindowPanel">  
            Long form for editing activities goes here......  
        </div> 
</center> 
</asp:Panel> 

SO what is supposed to happen is when StudentActivitiesToolBar is clicked it fires OnClientButtonClicked="StudentActivitiesToolBar_ClickHandler" in ViewInitializer.ascx, then StudentActivitiesToolBar_ClickHandler, opens the the rad window and makes an AjaxRequest to AjaxManager_AjaxRequest where it fires off ctrlAddEditActivityView.PreformOpenAddActivity which is supposed to set the form up for adding or editing an activity. This is how I am passing parameters to the UserControl.

I have got to the point where I have the client click event running the severside code to populate the form using the needed parameters but I can't get the form to refresh with the new data.

At first I had the AjaxManager in the ViewInitializer.ascx Control, and was able to get as far as running the server side code in the UserControl but I could not get the control to refresh and Loading panel to display. I then tried the AjaxManagerProxy and could not get that to work, Then I read in a thread that YOu should not use RadAjaxPanels with the AjaxManager so I changed them to asp:Panels, still could not get it to work. I then tried declaring the AjaxSetting in the CodeBehind of the ViewInitializer.ascx control and was unsuccessful there too. I was getting a null reference exception on the ajax manager when trying to Call AjaxManager.AddAjaxSetting. I then read that in a User control that The AjaxManager Has to be Declaired in the OnInit Method programmatically, and that the Ajax Settings have to be applied in the PreRender Event; This in now causing me problems when Trying to do this $find("<%= RadAjaxManager.ClientID %>"); .

   I am sure that I just have to be missing a few key concepts as they apply to this scenario, There seem to be several approaches and that apply to various situations and I'm not sure exactly how to go about it at this point. If anyone can help, myself and the folks at Remington College would be super grateful.

Thanks,

-Adam
Iana Tsolova
Telerik team
 answered on 04 Mar 2010
2 answers
659 views

Hi,

i have one Radtabstrip in aspx page having 3 tabs inside it.

<

 

telerik:RadTabStrip ID="TabStrip" runat="server" MultiPageID="RadMultiPage1" SelectedIndex="0">

 

 

<Tabs>

 

 

<telerik:RadTab Text="person"></telerik:RadTab>

 

 

<telerik:RadTab Text="finance"></telerik:RadTab>

 

 

<telerik:RadTab Text="Deadlines"></telerik:RadTab>

 

 

</Tabs>

 

 

</telerik:RadTabStrip>

now i want to change the text of tab inside my code in aspx.cs at runtime.
example like person became persondetails.

i could not able to find the controls and collection in code behind file.

can anyone please help me.

thanks in advance.

 

bharat kumar
Top achievements
Rank 1
 answered on 04 Mar 2010
2 answers
192 views
Hi,
I have Rad date time picker in my project. I need to restrict the resizing the Rad date time picker. but i couldnot. Kindly help me that how to do.  Herewith I attached the image also. kindly go through....
PALANISAMY V
Top achievements
Rank 1
 answered on 04 Mar 2010
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?