Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
202 views
Hi,
I have a lable control on my page which is not getting updated on an ajax callback. I can't figure out what's missing.

I have a button (cmdSearch) on my page with fires a RadWindow dialog. On the calling page I have an onClientClose handler in the javascript.

In that handler I have the followng code:
function DoDialogClose(sender)  
{  
 
    if (!sender.argument)  
        return false;  
 
    var sEventArg = "Update a Label";  
    if (sEventArg != "") {  
      
        var ram = $find("ctl00_RadAjaxManager1");  
        ram.ajaxRequest(sEventArg);   
    }  
 

It works great and the event handler on the server side gets called.
    Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)  
        If e.Argument.Length > 0 Then  
             lblMyLabel.Text = "Some text" 
        End If  
 
    End Sub  
 

I have my RadAjaxManagerProxy set as follows:
    <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="cmdSearch">  
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="lblMyLabel" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManagerProxy> 
 

The problem is that the label is never updated when I return from the Ajax call.
What am I missing?
Thanks ... Ed
Martin
Telerik team
 answered on 01 Jun 2010
1 answer
114 views
Hi,
I am trying to use several RadDatepicker controls in a RadPanel using a shared RadCalendar.
The problem I am facing is that the calendar is popping up correctly, but I am unable to select a date from the calendar.
I am using custom styles for the controls.
Please help asap.

Thanks.
Martin
Telerik team
 answered on 01 Jun 2010
1 answer
187 views
Dear All,

I am using master page for my application to give consistent page layout. I am facing problem whenever i am clicking radpanel my whole page is loading and i am noticing some flickering also. I am using server side coding for radpanel and that radpanel filtering with RadTabStrip. So I want to load only content page on clicking radpanel.I am attaching screenshoot. I want a solution for that.Thankyou..

please i want loading only content page how to solve this . 


<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Default.master.cs" Inherits="TelerikComponentsWS.Default" %> 
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
<head runat="server"
   <meta http-equiv="Page-Enter" content="blendTrans(Duration=0)" /> 
<meta http-equiv="Page-Exit" content="blendTrans(Duration=0)" /> 
   
 
    <title></title
    <link rel="Stylesheet" href="css/styles.css" type="text/css" /> 
  
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server"
        </telerik:RadStyleSheetManager> 
    <telerik:RadScriptManager ID="scm" runat="server" > 
   <Scripts> 
                <asp:ScriptReference Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" 
                                     Name="MicrosoftAjax.js" 
                                     Path="http://ajax.microsoft.com/ajax/3.5/MicrosoftAjax.js" /> 
            </Scripts> 
    </telerik:RadScriptManager> 
    <div style="height: 100%;" id="splitterContainer"
         <telerik:RadAjaxManager ID="radAjMan" runat="server" UpdatePanelsRenderMode="Inline" 
           > 
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID="horMenu"
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="leftMenu" /> 
                        <telerik:AjaxUpdatedControl ControlID="horMenu" LoadingPanelID="logPan"/> 
                       
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
            </AjaxSettings>            
        </telerik:RadAjaxManager> 
         
         
        <telerik:radformdecorator id="RadFormDecorator2" DecoratedControls="all" runat="server" decorationzoneid="ZoneID2" 
            skin="Windows7" ControlsToSkip="Select"
        </telerik:radformdecorator> 
         <telerik:radformdecorator id="RadFormDecorator1" DecoratedControls="all" runat="server" decorationzoneid="ZoneID3" 
            skin="Windows7" ControlsToSkip="Select"
        </telerik:radformdecorator> 
       <%-- <telerik:RadWindowManager ID="radWin" runat="server"
            <Windows> 
                <telerik:RadWindow ID="defFacWnd" OffsetElementID='<%#lnk_def_facility.ClientID%>' 
                    OpenerElementID='<%#lnk_def_facility.ClientID%>' NavigateUrl="~/User/DefFacility.aspx" 
                    OnClientClose="onDefFacClose" runat="server"
                </telerik:RadWindow> 
            </Windows> 
        </telerik:RadWindowManager>--%> 
        <telerik:RadFormDecorator ID="rad_decorator" runat="server" DecoratedControls="all" ControlsToSkip="Select"
        </telerik:RadFormDecorator> 
        <telerik:RadSplitter ID="contentSplitter" runat="server" Height="100%" Width="100%" 
          VisibleDuringInit="false" OnClientLoaded="initSplitter"  ResizeWithBrowserWindow="true" LiveResize="false" 
                PanesBorderSize="0" ResizeMode="EndPane"
            <telerik:RadPane ID="navigationPane" runat="server" Width="190" > 
                <div style="margin: 5px;"
                 <br/> 
                    <asp:Image ID="Image2" runat="server" ImageUrl="~/img/company_logo.jpg" /> 
                     
                    
                    <br /> 
                  <%--  <asp:LinkButton ID="lnk_def_facility" runat="server"></asp:LinkButton>--%> 
                </div> 
                
                <telerik:RadPanelBar ID="leftMenu" runat="server" Width="180px"
                </telerik:RadPanelBar> 
                 
                 <br/> 
                 <br/> 
                  <br/> 
                  
                <div > 
                <asp:Button runat="server" ID="btn_logout" Text="Logout"  CausesValidation="false" />   
                </div> 
            </telerik:RadPane> 
            <telerik:RadSplitBar ID="splitter" runat="server" CollapseMode="Forward"  /> 
            <telerik:RadPane ID="contentPane" runat="server" MinWidth="400"
             
                <div style="margin: 5px;"
                  <div id="ZoneID4" style="right: auto"
                <fieldset width="100%" style="border-style: none; padding-right: inherit;"  align="right"
                    <asp:Image ID="Image1" runat="server"  
                        ImageUrl="~/img/studentdatasuite_header.jpg" />  
                    </fieldset> 
                    </div> 
                   
                    <telerik:RadTabStrip ID="horMenu" runat="server" SelectedIndex="0" DataFieldID="module_id"
                        <DataBindings> 
                            <telerik:RadTabBinding TextField="module" ValueField="module_id" /> 
                        </DataBindings> 
                    </telerik:RadTabStrip> 
                   
                    
                </div> 
                <div style="margin: 5px;"
                 <asp:Panel ID="Panel1" runat="server"
                    <h2> 
                        <asp:Literal runat="server" ID="ltTitle"></asp:Literal></h2
                    <asp:ContentPlaceHolder ID="centerContent" runat="server"
                     
                    </asp:ContentPlaceHolder> 
                     </asp:Panel> 
                </div> 
                <div id="ZoneID3" style="right: auto"
                <fieldset width="100%" style="border-style: none; padding-right: inherit;"  align="center"
                    <p> Â© 2009 Sama IT Group. All rights reserved. 
                            <target="_self" title="Home" href="http://www.samaitgroup.com/">Home</a>  
                            <target="_self" title="Products" href="http://www.samaitgroup.com/products.html">Products</a>  
                            <target="_self" title="Aboutus" href="http://www.samaitgroup.com/aboutus.html">Aboutus</a> 
                            <target="_self" title="Support" href="http://www.samaitgroup.com/support.html">Support</a> 
                            <target="_self" title="Contacts" href="http://www.samaitgroup.com/contactus.html">Contacts</a> 
                            <asp:Label runat ="server" ID"lblLabel"></asp:Label> 
                       </p> 
                    </fieldset> 
                    </div> 
                 
            </telerik:RadPane> 
        </telerik:RadSplitter> 
       
        <telerik:RadAjaxLoadingPanel ID="logPan" runat="server" IsSticky="true" Transparency="30" 
            Style="position: absolute; top: 0; left: 0; line-height: 60px; text-align: center; 
            z-index: 99;" Width="100%" Height="100%" BackColor="#B9CDF7"
            <%--<asp:Image ID="img" runat="server" Width="130px" Height="60px" ImageUrl="~/img/loading.gif" 
                Style="border: 0; margin-top: 70px;"></asp:Image>--%> 
        </telerik:RadAjaxLoadingPanel> 
      
                     
                     
                 
    </div> 
<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1"
    <script type="text/javascript"
//        function onDefFacClose(oWnd) {            //get the transferred arguments 
//            var arg = oWnd.argument; 
//            if (arg) { 
//                var facName = arg.facName; 
//                $get(oWnd.get_openerElementID()).innerHTML = facName
//            } 
//        } 
        function initSplitter(sender, args)   
        {          
            sender.get_element().style.visibility = 'inherit';   
        }   
  
    </script> 
    
</telerik:RadScriptBlock> 
    </form> 
</body> 
</html> 
 
using System; 
using System.Linq; 
using Telerik.Web.UI; 
using TelerikComponentsWS.Common; 
using TelerikComponentsBL; 
using System.Web.UI; 
using System.Configuration; 
namespace TelerikComponentsWS 
    public partial class Default : System.Web.UI.MasterPage 
    { 
        protected void Page_Load(object sender, EventArgs e) 
        { 
            if(!IsPostBack) 
            { 
                navigationPane.Collapsed = !Membershipment.IsUserLogged; 
                if (!Membershipment.IsUserLogged) 
                { 
                    //btn_logout.Visible = false; 
                } 
                RebindTabs(); 
                
            } 
            horMenu.TabClick += new Telerik.Web.UI.RadTabStripEventHandler(horMenu_TabClick); 
            //btn_logout.Click += new EventHandler(btn_logout_Click); 
 
            string display = ConfigurationManager.AppSettings["Display"].ToString(); 
            if (display == "1"
            { 
                //lblLabel.Visible = true; 
 
            } 
            else 
            { 
                //lblLabel.Visible = false; 
               
            } 
        } 
        
       void btn_logout_Click(object sender, EventArgs e) 
        { 
            Membershipment.SignOut(); 
            Response.Redirect(CommonMethods.ResolveUrl("Login.aspx")); 
        } 
        void horMenu_TabClick(object sender, Telerik.Web.UI.RadTabStripEventArgs e) 
        { 
            OnModuleChanged(e.Tab.Value.GetInteger()); 
        } 
        private void RebindTabs() 
        { 
            int? module = null
            if (LogonDetails.Instance.MenusSet != null
            { 
                var modules = LogonDetails.Instance.MenusSet.Modules; 
                horMenu.DataSource = modules; 
                if (modules.Count() > 0) 
                { 
                    module = modules[0].module_id; 
                } 
            } 
            else 
            { 
                horMenu.DataSource = null
            } 
          
                horMenu.DataBind(); 
            
            if (LogonDetails.Instance.MenusSet != null
            { 
                if (Page is Screen) 
                { 
                    var screen = LogonDetails.Instance.MenusSet.MenuItems.FirstOrDefault(mi => mi.screen_id == (Page as Screen).ScreenId); 
                    if (screen != null
                    { 
                        module = screen.module_id; 
                        SelectModule(module); 
 
 
                        SetupTitle(screen.screen); 
                    } 
                } 
            } 
 
            OnModuleChanged(module); 
            if (Page is Screen) 
            { 
                SelectScreen((Page as Screen).ScreenId); 
            } 
        } 
 
        private void SetupTitle(string title) 
        { 
            ltTitle.Text = title; 
            Page.Title = title; 
        } 
 
        private void SelectScreen(int screenID) 
        { 
            foreach (RadPanelItem groupPanel in leftMenu.Items) 
            { 
                foreach (RadPanelItem screenItem in groupPanel.Items) 
                { 
                    if (screenItem.Value.GetInteger() == screenID) 
                    { 
                        groupPanel.Expanded = true
                        return
                    } 
                } 
            } 
        } 
 
        private void SelectModule(int? module) 
        { 
            if (module.HasValue) 
            { 
                var tab = horMenu.Tabs.Where(t => t.Value == module.Value.ToString()).FirstOrDefault(); 
                if (tab != null
                { 
                    if (!tab.Selected) 
                    { 
                        tab.Selected = true
                        OnModuleChanged(module); 
                    } 
                } 
                
            } 
        } 
 
 
 
        private void OnModuleChanged(int? module) 
        { 
            if (module.HasValue) 
            { 
                leftMenu.Items.Clear(); 
                if (LogonDetails.Instance.MenusSet != null
                { 
                    var items = LogonDetails.Instance.MenusSet.ModuleMenuItems(module.Value).OrderBy(item => item.link_group_sequence); 
                    var groups = items.GroupBy(item => item.link_group); 
                    foreach (var group in groups) 
                    { 
                        RadPanelItem groupPanel = new RadPanelItem(group.Key); 
                        var orderedGr = group.OrderBy(gr => gr.link_name_sequence); 
                        foreach (var item in orderedGr) 
                        { 
                            RadPanelItem itemPanel = new RadPanelItem(item.link_name); 
                            itemPanel.Value = item.screen_id.ToString(); 
                            itemPanel.NavigateUrl = item.location_link; 
                            groupPanel.Items.Add(itemPanel); 
                        } 
                        leftMenu.Items.Add(groupPanel); 
                    } 
                } 
            } 
        } 
     
         
    } 
 

Nikolay Tsenkov
Telerik team
 answered on 01 Jun 2010
3 answers
277 views
Hi

Am using a ordinary textbox and a rad input manager and Telerik textboxsetting . I want to denote mandatory field by using the character * . I had attached the screen shot for your persual. Kindly suggest me a solution .

Thanks in advance
Maria Ilieva
Telerik team
 answered on 01 Jun 2010
2 answers
98 views
Hi,
I want to set a custom ressource provider class (not a ressources file .resx)
to a WebForm RadSchduler, I don't kow how can I do that. 

I Find an example of what i wan't, but it's in winform :  http://www.telerik.com/community/code-library/winforms/localization-providers/french-radgridviewlocalization-q2-2009-sp1.aspx

thanx for your response.
N H
Top achievements
Rank 1
 answered on 01 Jun 2010
1 answer
97 views
Hi,

Can we put a line or any other seperator between nodes of tree?

Regards,
Lubna.
Nikolay Tsenkov
Telerik team
 answered on 01 Jun 2010
4 answers
292 views
My problem is my call to ajaxRequestWithTarget is doing a repost when I expect an ajax update.

I have a master page containing RadAjaxManager, and a content page containing two user controls, uc1 and uc2.

uc1 has a ajax-enabled asp:Button and a text box inside an asp:Panel. Clicking on uc1.Button1 does the right thing, an ajax update without a full page refresh. My Page_Load:

protected void Page_Load(object sender, EventArgs e) 
  RadAjaxManager radAjaxManager = RadAjaxManager.GetCurrent(Page); 
  radAjaxManager.AjaxSettings.AddAjaxSetting(uc1.FindControl("Button1"),  uc1.FindControl("Panel1"), null); 


I have a list box in uc2. When an item in uc2.List1 is clicked, I want to simulate clicking uc1.Button1. My javascript code looks something like:

var ajaxManager = $find('<%= RadAjaxManager.GetCurrent(Page).ClientID %>'); 
var buttonID = '<%= GetUc1Control("Button1").UniqueID %>'
ajaxManager.ajaxRequestWithTarget(buttonID, ''); 


The call to ajaxRequestWithTarget is correctly updating the content of uc1, but it is causing a refresh of the entire page. How do I fix this problem?
Keith Morgan
Top achievements
Rank 1
 answered on 01 Jun 2010
1 answer
78 views
Hi,

I am getting javacript errors while hovering over disabled radcomboboxes in a user control. I am using this usercontrol to display when I load radgrid edit template.
I am enabling and disabling combos based on values in edited row in pageload of usercontrol.ascx.cs and on moving the mouse over the disabled combos, I get error "Value must be a DOM element"

I did searched in telerik forums and located a post discussing similar issue and following solution was suggested there,
<script type="text/javascript" language="Javascript">  
        var oldDomEvent = Sys.UI.DomEvent;  
        Sys.UI.DomEvent = function(rawEvent) {  
            if (rawEvent.srcElement && typeof (rawEvent.srcElement.getClientRects) == "undefined"return;  
            var evt = new oldDomEvent(rawEvent); for (var o in evt) this[o] = evt[o];  
        }  
        for (var o in oldDomEvent) Sys.UI.DomEvent[o] = oldDomEvent[o];     
    </script> 
 This solution do prevent error on mouse hover but throws other javascript errors ( error with browser event handlers or similar) when I perform update or close usercontrol or click on edit command of another row.
Therefore , I need a better and stable solution than the script above to fix my error when I hover over disabled radcomboboxes.

Thanks

Simon
Telerik team
 answered on 01 Jun 2010
2 answers
351 views

Respected Developers,

I am looking for a way to disable the AutoComplete feature of a RadDateInput control.  I can't achieve it.  this is what I have tried:

 

<telerik:RadDateInput runat="server"
ID="DatePlanned"
AutoPostBack="false"
autocompletetype="Disabled"
OnTextChanged="LineDetailDatePlanned_TextChanged"
DateFormat="MM/dd/yyyy"
TabIndex="6"
style="width:105px;height:22px;border: 1px solid #80A0C0;font-family:Arial;font-size:10pt;padding:2px;color:Black;text-align:center;"
IncrementSettings-InterceptArrowKeys="false"
IncrementSettings-InterceptMouseWheel="false" />

 

 


Your help will be appreciatted.

Eduardo Dulanto

 

Eduardo Dulanto
Top achievements
Rank 1
 answered on 01 Jun 2010
1 answer
122 views
Hi there, I have a RadGrid with an Item tempalte


<telerik:RadGrid.... >
<ItemTemplate>
.....
</ItemTemplate>
</telerik:RadGrid>

I'd like to filter the items in my item template, based on a value selected in a treeview. In this case the treeview contains, property types - bungalow, house etc, and the itemtemplate contains a table displaying the various information on a property.

Is this possible ?

In the selectednodechanged event i'm attempting to apply the filtering there.
MyGrid.MasterTableView.FilterExpression = ...

But it can't find the field i'm specifying. Do i have to use a column bound to this datafield in order to filter ?

Pavlina
Telerik team
 answered on 01 Jun 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?