Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
158 views
I have 3 radGrid controls on a page  that require refreshing when a product changes on the fly. 
i have a javascript class containing a method Validate() that calls refreshGrids(with a new product id) .
The RadAjaxManager1_AjaxRequest  event  fires and the grids are repopulated however the grids have not refreshed with the new dataset.

I followed the published examples and tried the solutions on the forum  with no success.
I tried moving the code found in GetData into the RadAjaxManager1_AjaxRequest... still no success.
Please advise.

Regards  Emran

Designer

 
        <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function refreshGrids(arg) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);
                }
            </script>
        </telerik:RadCodeBlock>
    
         <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">
             <AjaxSettings>
                 <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                     <telerik:UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="rgAnyTo" />
                        <telerik:AjaxUpdatedControl ControlID="rgSpecificTo"  />
                        <telerik:AjaxUpdatedControl ControlID="rgInformationOnly"  />
                    </telerik:UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
        </telerik:RadAjaxManager>
        
        <label>Any Switches</label>
        <telerik:RadGrid ID="rgAnyTo" runat="server" AutoGenerateColumns="False" GridLines="None" GroupingEnabled="False" ShowHeader="False" >
            <HeaderContextMenu>
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <mastertableview>
                <Columns>
                    <telerik:GridBoundColumn DataField="sFullDisplayRecommendation" UniqueName="sFullDisplayRecommendation"></telerik:GridBoundColumn>
                </Columns>
            </mastertableview>
        </telerik:RadGrid>
                                    
        <label>Specific Switches</label>
        <telerik:RadGrid ID="rgSpecificTo"  runat="server" AutoGenerateColumns="False" GridLines="None" GroupingEnabled="False" ShowHeader="False" >
            <HeaderContextMenu>
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <mastertableview>
                <Columns>
                    <telerik:GridBoundColumn DataField="sFullDisplayRecommendation" UniqueName="sFullDisplayRecommendation"></telerik:GridBoundColumn>
                </Columns>
            </mastertableview>
        </telerik:RadGrid>
                                    
        <label>Information </label>
        <telerik:RadGrid ID="rgInformationOnly"  runat="server" AutoGenerateColumns="False"  GridLines="None" GroupingEnabled="False" ShowHeader="False">
            <HeaderContextMenu>
                <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>
            </HeaderContextMenu>
            <mastertableview>
                 <Columns>
                    <telerik:GridBoundColumn DataField="sFullDisplayRecommendation" UniqueName="sFullDisplayRecommendation"></telerik:GridBoundColumn>
                </Columns>
             </mastertableview>
         </telerik:RadGrid>      
        
 
  Code behind


        protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
        {
            GetData(Convert.ToInt32(e.Argument));
        }

        public void GetData(int OrigProductId)
        {
            BusinessLib.LinqEntities.CedarLinqDataContext cedar = new BusinessLib.LinqEntities.CedarLinqDataContext();
            BusinessLib.LinqEntities.LinqClassesDataContext admin = new BusinessLib.LinqEntities.LinqClassesDataContext();
            BusinessLib.LinqEntities.RecommendationSet set = cedar.RecommendationSets.Single(p => p.iRecommendationSetId == 110);

            var resultSet = from rt in cedar.RecommendationTrunks
                            join oProd in cedar.LIVE_Products on new { ProductID = rt.iOriginalProductID, VersionID = set.iDrugVersion } equals
                                new { ProductID = oProd.iProductID, VersionID = oProd.iVersionID }
                            join rProd in cedar.LIVE_Products on new { ProductID = rt.iReplacementProductID, VersionID = set.iDrugVersion } equals
                                new { ProductID = rProd.iProductID, VersionID = rProd.iVersionID } into g2
                            join oBNF in cedar.LIVE_BNFDetails on new { BNFID = oProd.iBNFID, VersionID = set.iDrugVersion } equals
                                new { BNFID = oBNF.iBNFID, VersionID = oBNF.iVersionID }
                            from rProd in g2.DefaultIfEmpty()
                            where
                                rt.iRecommendationSetId == NumberUtils.CIntDef(Session["RecommendationSetId"]) &&
                                rt.bDeleted == false &&
                                rt.bDisabled == false &&
                                rt.iDosageTypeID != 2 &&
                                rt.iOriginalProductID == OrigProductId
                            select rt;
                            
            var rsAny = from rs in resultSet
                           where
                                rs.iRecommendationTypeID == (byte)RecommendationType.Switch &&
                                rs.iDosageTypeID != (byte)DosageType.Specific
                           select rs;
            
            rgAnyTo.DataSource = rsAny;
            rgAnyTo.DataBind();
            rgAnyTo.Rebind();

            var rsSpecfc = from rs in resultSet
                           where
                                rs.iRecommendationTypeID == (byte)RecommendationType.Switch &&
                                rs.iDosageTypeID == (byte)DosageType.Specific                           
                           select rs;
            rgSpecificTo.DataSource = rsSpecfc;
            rgSpecificTo.DataBind();
            rgSpecificTo.Rebind();

            var rsInfo = from rs in resultSet
                         where
                               rs.iRecommendationTypeID == (byte)RecommendationType.Info
                         select rs;
            rgInformationOnly.DataSource = rsInfo;
            rgInformationOnly.DataBind();
            rgInformationOnly.Rebind();
        }

Iana Tsolova
Telerik team
 answered on 26 Feb 2009
1 answer
108 views
Hi
  I have downloaded the file Telerik.DNN.Modules_2008_3_1314_trial.zip provided by Telerik.com But in that file couldn't find out rotator related files for example .ascx ..Please guide me and provide appropriate link to download that!
thanks

Fiko
Telerik team
 answered on 26 Feb 2009
4 answers
168 views
Hi
I have a grid in a page (gridpage.aspx) and I'm using a RadWindow to allow edit for each item (editpage.aspx)
The edit page contains several fields and one "Update" button. It also containsa RadAjax manager to ajaxify the call to the  "Update" button.
What is happening upon the update is that I'm using the Radajaxmanager.ResponseScripts method to close the radwindow and force the grid to rebind. What i would like to avoir in the RadAjax response is to have to carry all the viewstate. Is that possible? It will save some extra bandwith.
Regards
Philippe
Philippe GRACA
Top achievements
Rank 1
 answered on 26 Feb 2009
4 answers
216 views
I am dynamically creating a datatable and a radgrid with autogenerated columns to display report information .
Some of the column headers are fairly long so I would like to increase the columns widths, I'm just not sure when the columns are generated. I tried changing them on ItemDataBound, it doesn't seem to recognize them.

            RadGrid gv = new RadGrid(); 
            gv.ID = "tmpGrid"; 
            gv.MasterTableView.HeaderStyle.VerticalAlign = VerticalAlign.Top; 
            gv.MasterTableView.HeaderStyle.Width = Unit.Pixel(200); 
            gv.ItemDataBound += new GridItemEventHandler(gv_ItemDataBound); 
            gv.AutoGenerateColumns = true; 
            gv.DataSource = master; 
            PlaceHolder1.Controls.Add(gv); 
            gv.DataBind(); 
 
        void gv_ItemDataBound(object sender, GridItemEventArgs e) 
        { 
            if (e.Item is GridDataItem) 
            { 
                foreach (GridColumn gc in e.Item.OwnerTableView.RenderColumns) 
                { 
                    gc.HeaderStyle.Width = Unit.Pixel(200); 
                } 
            } 
        } 

Please help.
Aaron
Aaron
Top achievements
Rank 1
 answered on 26 Feb 2009
1 answer
237 views
In the blog post "RadControls for ASP.NET AJAX receive a major face-lift!" Tervel points us at the WebMail demo using the new skins.

Go to the demo and select "Notes" from the panelbar on the left hand side. Now double-click on any note to open it.

What I'm seeing here (both in FF3 and IE8 is that the popup window for the note is on top of the workspace (as you'd expect) but behind the workspace's menu bar. Further, in IE, the notes.aspx page generates an error ...

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022)
Timestamp: Tue, 24 Feb 2009 15:32:08 UTC

Message: Object doesn't support this property or method
Line: 17039
Char: 1
Code: 0
URI: http://demos.telerik.com/webmail/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8ac4a3ed-a467-4f19-a8ed-9270f6e4c6d6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.220.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a89af9faf-38f3-4057-a2b2-9f3a37d80790%3a63b115ed%3a16e4e7cd%3a1569bb5f%3a874f8ea2%3adc7e0bd%3a1c565fc%3ac408cfaa%3a33108d14%3a86526ba7

Message: Object doesn't support this property or method
Line: 141
Char: 21
Code: 0
URI: http://demos.telerik.com/webmail/Compose.aspx?rwndrnd=0.39355143053336266

Message: 'Telerik.Web.UI.FormDecoratorDecoratedControls.Default' is null or not an object
Line: 17033
Char: 1
Code: 0
URI: http://demos.telerik.com/webmail/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8ac4a3ed-a467-4f19-a8ed-9270f6e4c6d6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.220.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a89af9faf-38f3-4057-a2b2-9f3a37d80790%3a63b115ed%3a16e4e7cd%3a1569bb5f%3a874f8ea2%3adc7e0bd%3a1c565fc%3ac408cfaa%3a33108d14%3a86526ba7

Message: 'document' is null or not an object
Line: 10578
Char: 1
Code: 0
URI: http://demos.telerik.com/webmail/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManager_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a8ac4a3ed-a467-4f19-a8ed-9270f6e4c6d6%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2009.1.220.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a89af9faf-38f3-4057-a2b2-9f3a37d80790%3a63b115ed%3a16e4e7cd%3a1569bb5f%3a874f8ea2%3adc7e0bd%3a1c565fc%3ac408cfaa%3a33108d14%3a86526ba7

In support of this, the buttons on the popup window are not decorated.

This seems to happen with both of the skins available in the demo.
Paul
Telerik team
 answered on 26 Feb 2009
3 answers
149 views
Hello,

on one of my pages i have a usercontrol that exposes a OnClick event. When i add an ajaxsetting on the manager for the usercontrol and the associated event, my updated controls are not being updated. do i need to do something different to wire up user controls?

Iana Tsolova
Telerik team
 answered on 26 Feb 2009
1 answer
62 views
I have a RadToolTip attached to an image roll-over. Here are the properties on the tool tip:

 
legendTip.Controls.Add(legendTable); 
legendTip.TargetControlID = dateLabelTable.ID; 
legendTip.IsClientID = false; 
legendTip.Animation = ToolTipAnimation.None; 
legendTip.RelativeTo = ToolTipRelativeDisplay.Element; 
legendTip.HideDelay = 20000; 
legendTip.Sticky = true; 
legendTip.Position = ToolTipPosition.TopRight; 
legendTip.Skin = "Web20"; 
legendTip.EnableEmbeddedSkins = true; 

The contents of the tool tip is a single Table control.

When we pop up the tooltip the first time, it looks like this:  Good Image

When we pop up the tooltip a subsequent time, it looks like this: Bad Image

Can you help me figure out why we are getting this behavior?
Svetlina Anati
Telerik team
 answered on 26 Feb 2009
1 answer
109 views
Is it possible?  For example,  the page iFrameModalDemo.aspx is the parent page that loads Default.aspx.  Is it possible for Default.aspx to open another RadWindow?  W/ the markup below...when Default.aspx is loaded into a RadWindow and its buttons are clicked, a postback occurs instead of opening a RadWindow.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="iFrameModalDemo.aspx.cs" Inherits="iFrameModalDemo" %> 
 
<!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"> 
    <title>Untitled Page</title>     
</head> 
<body> 
    <form id="form1" runat="server">     
    <rad:RadWindowManager runat="server"> 
        <Windows> 
            <rad:RadWindow runat="server" Behavior="Default" InitialBehavior="None" Left=""  
                NavigateUrl="http://www.telerik.com" style="display:none;" Title="Window"  
                Top="" OpenerElementID="btnTelerik"> 
            </rad:RadWindow> 
            <rad:RadWindow ID="rwDialog" runat="server" Behavior="Default"  
                InitialBehavior="None" Left="" Modal="True" NavigateUrl="Default.aspx" 
                style="display:none;" Top="" OpenerElementID="btnDialog"> 
            </rad:RadWindow> 
        </Windows> 
    </rad:RadWindowManager> 
    <asp:Button ID="btnTelerik" runat="server" Text="Telerik" /> 
    <asp:Button ID="btnDialog" runat="server" Text="Dialog" /> 
    </form>         
</body> 
</html> 
 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>  
  
<!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">  
    <title>Untitled Page</title>      
</head>  
<body>  
    <form id="form1" runat="server">      
    <rad:RadWindowManager runat="server">  
        <Windows>  
            <rad:RadWindow runat="server" Behavior="Default" InitialBehavior="None" Left=""   
                NavigateUrl="http://www.telerik.com" style="display:none;" Title="Window"   
                Top="" OpenerElementID="btnTelerik">  
            </rad:RadWindow>  
            <rad:RadWindow ID="rwDialog" runat="server" Behavior="Default"   
                InitialBehavior="None" Left="" Modal="True" NavigateUrl="Default.aspx"  
                style="display:none;" Top="" OpenerElementID="btnDialog">  
            </rad:RadWindow>  
        </Windows>  
    </rad:RadWindowManager>  
    <asp:Button ID="btnTelerik" runat="server" Text="Telerik" />  
    <asp:Button ID="btnDialog" runat="server" Text="Dialog" />  
    </form>          
</body>  
</html>  
Georgi Tunev
Telerik team
 answered on 26 Feb 2009
10 answers
2.6K+ views

Trying to set the InitialBehaviors to maximize on the radWindow's OnInit event, and when I pop the window, it's not maximized.  Am I missing something?

ASP.NET Code:

<

body>

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

<asp:Panel ID="pnlPageRender" runat="server" OnInit="pnlPageRender_OnInit" Visible="false">

<asp:ScriptManager ID="smPageRender" runat="server" />

<asp:Literal ID="ltlJS" runat="server" Visible="false" />

<asp:Label ID="lblErrMsg" runat="server" Visible="false" />

<asp:Label ID="lblHTML" runat="server" />

<telerik:RadWindowManager ID="rwmPageRender" runat="server" Visible="true" VisibleOnPageLoad="false">

<Windows>

<telerik:RadWindow ID="rwContentItem" runat="server"

Behaviors="Close,Maximize,Move,Pin,Reload,Resize"

DestroyOnClose="true"

Modal="true"

OnClientClose="fWinRefresh"

OnInit="rwContentItem_OnInit"

ReloadOnShow="true"

ShowContentDuringLoad="false"

Skin="WebBlue"

VisibleStatusbar="false"

>

</telerik:RadWindow>

</Windows>

</telerik:RadWindowManager>

</asp:Panel>

<asp:Panel ID="pnlInstructions" runat="server" OnInit="pnlInstructions_OnInit" Visible="false">

<p>This is where the Page Creation instructions go.</p>

</asp:Panel>

</form>

</

body>
---
Here's the code behind for the OnInit:

protected void rwContentItem_OnInit(object sender, EventArgs e)

{

RadWindow rw = (RadWindow)sender;

rw.InitialBehaviors =

WindowBehaviors.Maximize;

}

Thanks in advance!

-cole

Georgi Tunev
Telerik team
 answered on 26 Feb 2009
1 answer
214 views
Hi.. Again Suriya.,

             Now i have problem in passing value in one radwindow and retriving that value in another radwindow...

For example:

    If i am passing a code from one radwindow., that code should be retrived in an another radwindow...

Plz reply as soon as possinble...


  By

Suriya
Georgi Tunev
Telerik team
 answered on 26 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?