Telerik Forums
UI for ASP.NET AJAX Forum
18 answers
622 views
I am on my way to having my first "Prometheus" ajax page.  I switched out the RadAjaxPanel, LoadingPanel, added the RadCodeBlock to my JS section and the ScriptManager to the top of the page.  Now when I click a button on the page it does the ajax callback fine, but when I click it again it does a postback and does a postback any time thereafter.  It seems that only the first time a postback is performed does it do the callback.  

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true">  
    </asp:ScriptManager> 
    <telerik:RadCodeBlock ID="cb" runat="server">  
 
        <script language="javascript" type="text/javascript">  
        window.CalendarChanged = function(calendarInstance, args)  
        {  
            if (args.RenderDay.IsSelected)   
                return false;   
        }  
        window.GetTodaysDateSCH = function(){GetDateStamp(<%=this.txtDate.ClientID %>);}  
        </script> 
 
    </telerik:RadCodeBlock> 
    <telerik:RadAjaxLoadingPanel ID="alp" runat="server" IsSticky="true" MinDisplayTime="0" 
        HorizontalAlign="Center">  
        <asp:Image ID="Image2" runat="server" alt="loading..." ImageUrl="~/Images/Loading2.gif" /> 
    </telerik:RadAjaxLoadingPanel> 
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="alp" EnableAJAX="true" 
        EnableHistory="true" EnablePageHeadUpdate="true">  
        <table> 
            <tr> 
                <td> 
                    <asp:Label ID="title" runat="server" Text="Schedule Search: " /> 
                    <radCln:RadDatePicker ID="txtDate" runat="server" SharedCalendarID="RadCalendar1" 
                        onkeypress="GetTodaysDateSCH();" MinDate="1/1/2000" OnSelectedDateChanged="txtDate_SelectedDateChanged">  
                        <DateInput Title="" ToolTip="Press 'd' for current date" AutoPostBack="true" UseEmbeddedScripts="false" 
                            DateFormat="MM/dd/yyyy">  
                        </DateInput> 
                    </radCln:RadDatePicker> 
                    <radCln:RadCalendar ID="RadCalendar1" runat="server" Skin="WebBlue" UseEmbeddedScripts="false">  
                        <ClientEvents OnDateClick="CalendarChanged" /> 
                    </radCln:RadCalendar> 
                    <asp:Button ID="cmdRefresh" runat="server" Text="Refresh" OnClick="cmdRefresh_Click" /> 
                </td> 
            </tr> 
        </table> 
        <radG:RadGrid ID="rg" runat="server" Style="width: 100%;" AutoGenerateColumns="False" 
            AllowSorting="True" GridLines="None" OnItemDataBound="rg_ItemDataBound" OnNeedDataSource="rg_NeedDataSource">  
            <MasterTableView GridLines="None">  
                <Columns> 
                    <radG:GridBoundColumn DataField="ID" ReadOnly="True" UniqueName="ID" Visible="False">  
                    </radG:GridBoundColumn> 
                    <radG:GridBoundColumn DataField="PatientEncounter_ID" ReadOnly="True" UniqueName="PatientEncounter_ID" 
                        Visible="False">  
                    </radG:GridBoundColumn> 
                    <radG:GridBoundColumn HeaderText="Time" UniqueName="Time" DataField="Time">  
                    </radG:GridBoundColumn> 
                    <radG:GridTemplateColumn HeaderText="Patient" UniqueName="patient" Groupable="False">  
                        <ItemTemplate> 
                            <asp:HyperLink ID="hlp" runat="server" Text='<%# DataBinder.Eval( Container, "DataItem.Patient") %>'></asp:HyperLink> 
                        </ItemTemplate> 
                    </radG:GridTemplateColumn> 
                    <radG:GridBoundColumn HeaderText="Account Number" UniqueName="AccountNumber" DataField="AccountNumber">  
                    </radG:GridBoundColumn> 
                    <radG:GridBoundColumn HeaderText="Procedure" UniqueName="ProcedureName" DataField="ProcedureName">  
                    </radG:GridBoundColumn> 
                    <radG:GridTemplateColumn UniqueName="TemplateColumnAdditionalProcedure" Groupable="False">  
                        <ItemTemplate> 
                            <asp:HyperLink ID="hl" runat="server" ImageUrl="~/Images/MedicalChart.gif"></asp:HyperLink> 
                        </ItemTemplate> 
                    </radG:GridTemplateColumn> 
                </Columns> 
            </MasterTableView> 
            <AlternatingItemStyle BackColor="#ECECEC" /> 
        </radG:RadGrid> 
    </telerik:RadAjaxPanel> 
 



Thanks...  Jason
Jason Maronge
Top achievements
Rank 1
 answered on 05 Aug 2007
3 answers
251 views

Hi there,

I’m trying to figure out how to use Prometheus and got stuck with the problem I try to describe below.

As you can see I am instantiating two ‘BaseControl’ user controls in the page.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register Src="BaseControl.ascx" TagName="BaseControl" TagPrefix="uc1" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="telerik_old" %>

<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik_prometheus" %>

<!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">

<asp:ScriptManager ID="SriptManager1" runat="server">

</asp:ScriptManager>

<telerik_old:RadAjaxManager ID="RadAjaxManager1" runat="server">

</telerik_old:RadAjaxManager>

<div>

<uc1:BaseControl ID="BaseControl1" runat="server" />

<uc1:BaseControl ID="BaseControl2" runat="server" />

</div>

</form>

</body>

</html>

The user control is as follows:

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="BaseControl.ascx.cs" Inherits="BaseControl" %>

<asp:Panel ID="OuterPanel" runat="server" Height="100px">

<asp:Panel ID="InnerPanel" Visible="false" runat="server" EnableViewState="false">

inner

</asp:Panel>

outer

</asp:Panel>

<script type="text/javascript">

function <%= this.ClientID %>_doAjaxRequest()

{

<%= AjaxManager.ClientID %>.AjaxRequestWithTarget("<%= this.UniqueID %>", "iNIT");

document.getElementById('<%= OuterPanel.ClientID %>').style.backgroundColor = '#0000ff';

}

setTimeout('<%= this.ClientID %>_doAjaxRequest()', 200);

</script>

And…

using System;

using System.Web;

using System.Web.UI;

using System.Threading;

//using Telerik.Web.UI;

using Telerik.WebControls;

public partial class BaseControl : UserControl, IPostBackEventHandler

{

protected override void CreateChildControls()

{

base.CreateChildControls();

}

protected void Page_Load(object sender, EventArgs e)

{

AjaxManager.AjaxSettings.AddAjaxSetting(this, OuterPanel, null );

AjaxManager.AjaxSettings.AddAjaxSetting(OuterPanel, OuterPanel, null);

}

public virtual void RefreshData()

{

InnerPanel.Visible = true;

Thread.Sleep(2000);

}

public void RaisePostBackEvent(string eventArgument)

{

RefreshData();

}

public RadAjaxManager AjaxManager

{

get

{

return ((RadAjaxManager)Page.FindControl("RadAjaxManager1"));

}

}

}

This works great with RadAjax – which means that the content for ‘InnerPanel’ is initally invisible and then ‘loaded’ via AjaxRequest.

The problem happens when I replace:

1)

using Telerik.WebControls;

with

using Telerik.Web.UI; (in BaseControl.ascx.cs)

2)

<telerik_old:RadAjaxManager ID="RadAjaxManager1" runat="server">

</telerik_old:RadAjaxManager>

with

<telerik_prometheus:RadAjaxManager ID="RadAjaxManager1" runat="server">

</telerik_prometheus:RadAjaxManager>

(in default.aspx)

After these two changes I am using Prometheus’ AjaxManager and the app doesn’t work anymore. I start getting the following error:

The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).

The question is: what am I missing here? Shouldn’t it work?

Any advice?

Thanks,

Paulo

Konstantin Petkov
Telerik team
 answered on 04 Aug 2007
2 answers
140 views
I am testing your product with all the other 3rd party software we use and we ant to make sure its compatible.
I am seeing a lot of problems with ajax and this tooltip,
the latest is PageRequestManagerParserERrorException when i enable ASPRedirectory from intesoft (http://www.intesoft.net/Home/)
my tooltip was working until i added the asp redirector
i even put the radtooltip inside a asp:Update panel, same result.
my radtooltip are loaded using the onajaxupdate event.
I am unable to send a project attachment at this point but I believe downloading the trial of that redirector you will reproduce the problem first shot.
Tsvetie
Telerik team
 answered on 03 Aug 2007
3 answers
174 views
I would like to know if there is a way to have the handles display but not able to be clicked?

The slider looks much better with the + and - graphics in place, but it would be nice to have them disabled so that the user must use the track bar.

Can this be done?

Shawn
Petio Petkov
Telerik team
 answered on 03 Aug 2007
1 answer
152 views
Hi, I am facing a major issue with copy paste from external sites in RADEditor - Full Version.

When we tried to copy the text copied from any external site for e.x. BBC.Co.uk, ABC.com.au, www.antara.co.id , in RADEditor the text is getting pasted with default font (Times New Roman - Size 3). It is not pasting with the font styles applied in the external site.

But If I copy the text into word and paste it in RADEditor, I am getting the same styles as in External Site.

As our client always use the external site content to paste in RADEditor. I would appreciate if you help me resolve this issue.
Lini
Telerik team
 answered on 03 Aug 2007
3 answers
209 views
It seems that if I move any docks between zones in one pane while I have a different pane collapsed, I cannot reopen the collapsed pane.

Am I missing something?

Thanks.
Petio Petkov
Telerik team
 answered on 03 Aug 2007
4 answers
115 views
Hi,

I am trying to see if it's possible to add as buttons into the RadEditor's toolbar for the following functions 'Insert Anchor', 'Insert Email' and 'Image Map Editor'?
I noticed that Insert Anchor' and 'Insert Email' are accessible within the 'Link Manager' as sub tabs and also that 'Image Map Editor' is accessible after a image has been placed via a right click.

Also, is it possible to doc the toolbar below the 'Address Bar' in the browser or is that browser specific? The browser in question will be Microsoft's IE v6.0+

Thanks.

Regards,
Keith.




Clive Atkins
Top achievements
Rank 1
 answered on 02 Aug 2007
3 answers
345 views
Hi,
The various deployment options of telerik controls (problem would occur with other 3rd party controls as well) with Moss may cause some problems at some time. Either for Web Part development or specific apps in layouts folder one is facing the following limitations:
1) if not deploying in GAC, several versions of the same control may not cohabit. The latest deployement will override the previous ones and will break possible web parts or apps using that specific version.
2) If deploying in GAC still you may encounter a problem in the following scenario. Let's say a Web Part using some radcontrols has been deployed. Another web part using some radcontrols - some of them being used  as well by the first web part - is also deployed afterwards. In case, one of this web part is removed (solution is retracted), the radcontrols that were deployed alongside this web part will be removed from the GAC thus breaking the other web part which was relying on some radcontrols that have been removed.

Can you confirm my scenario?

In order to get rid of this dependency, I made some tests using ILMerge:
I built a web part and merged it with the radcombobox control assembly and then deployed this web part on Moss.

When using embeded sripts, it didn't work. For some reason, I am getting a script error on the page. There must be some good reason why but I didn't get further.
I then decided to use scripts from from radcontrols "dir". I had to rename the script version folder using the version of the resulting merged assembly. That seems quite logical as you must asked for the current assembly version. Though it seems to load the script correctly and be overall working, I have some strange results.
More specifically, regarding radcombobox, the drop down does not expand adjacent to the input field like if I had applied a 200 OffsetX.

I did not test other radcontrols using ILMerge as there seems to be some side effects.

Any idea of what could be the reason?

What do you think of the ilmerge scenario? It could solve some deployment problems when using development frameworks like Moss and could also make it possible to prevent possible reuse of your controls by internalizing them when merged.

Thanks in advance for any input.
Regards,
Dimitar Milushev
Telerik team
 answered on 02 Aug 2007
4 answers
327 views
Can anyone tell me if this is the correct way to dynamically create the tooltip for a control (I have a Panel on the page):

 

    protected void Page_Load(object sender, EventArgs e)  
    {  
      ScriptManager scriptManager = new ScriptManager();  
      scriptManager.ID = "MyScriptManager";  
      this.Panel1.Controls.Add(scriptManager);  
 
      Label lab1 = new Label();  
      lab1.Text = "Dette er min test tekst";  
      lab1.ID = "MyTest";  
      this.Panel1.Controls.Add(lab1);  
 
      Telerik.Web.UI.RadToolTipManager toolTipMngr = new Telerik.Web.UI.RadToolTipManager();  
      toolTipMngr.AjaxUpdate += new Telerik.Web.UI.ToolTipUpdateEventHandler(toolTipMngr_AjaxUpdate);  
      toolTipMngr.TargetControls.Add("MyTest");  
      this.Panel1.Controls.Add(toolTipMngr);  
 
 
    }  
 
    void toolTipMngr_AjaxUpdate(object sender, Telerik.Web.UI.ToolTipUpdateEventArgs e)  
    {  
      e.UpdatePanel.Controls.Add(new HtmlGenericControl("hr"));  
    }  
 
Henrik Brinch
Top achievements
Rank 2
 answered on 02 Aug 2007
3 answers
213 views
We are currently developing a new Intranet using MOSS2007 and are trialling r.a.d.Editor (Free Lite MOSS Edition).

I am trying to customize the Paragraph Heading Styles (Heading 1, Heading 2, etc..) so that our own look and feel is used. For example: Heading 1 is to be Blue, Arial, size 14, Bold, etc.
I've edited the style sheet connected to the page layouts we use, so that our own H1, H2, H3, etc... styles are defined. When using the r.a.d editor and applying a paragraph style, for example, the Heading 1 style to text, the correct style (i.e. Blue, Arial, 14, Bold) is applied, but only when the page is published.

When the page is in edit mode and I am working in the r.a.d.Editor, the customized styles do not show - only the pre-defined styles that come with the r.a.d.Editor are displayed in the Paragraph Styles drop-down list - the headings are not WYSIWYG.

I hope this makes sense. Is there any way to edit the Paragraph Styles so that the Headings in the Paragraph Styles drop-down list display exactly how they will appear when published?

Thanks,
Claudia
Lini
Telerik team
 answered on 02 Aug 2007
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?