Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
108 views
Hi,

Is there anyway to specifically limit the dimensions of the editable area in rad editor? I am planning to use the editor in a portal application, and user will be editing parts of portal blocks; which are fixed in width and height. If I can limit the width and height of the rad editor's editable area, the user might know how the content will look in portal exactly while editing it in the rad editor. For instance, knowing where the line breaks will appear, or if the image will fit etc.

Setting the extarnal dimensions of the editor won't work because the toolbars change position according to the width; sometimes two toolbars appear next to each other in same line, but sometimes (depending on the editor width they appear on seperate lines, thus reducing the height of content area.

Any help is appreciated.

Thanks
Rumen
Telerik team
 answered on 18 Feb 2009
2 answers
123 views
When I open a RadWindow from within a SharePoint web part (wss 3.0 or SharePoint 2007) and want to have it centered on the browser screen (default behavior), the window is not centered when the bowser has scroll bars and the screen position is scrolled (either vertically or horizontally). When the browser has no scroll bars or the scroll bars are at the top (vertical) and left (horizontal) position however, the window is centered as expected.

When I execute the same code from within a ASP.NET page (not using SharePoint), everything works as expected (scrolled as well as non scrolled). I use the RadAjax 2008 Q2 version of the controls and IE6 or IE7.

This behavior can be simulated using the code below:

Web part (WebPartRadWindow.cs file) :

 

 

using System;  
using System.Runtime.InteropServices;  
using System.Web.UI;  
using System.Web.UI.WebControls.WebParts;  
using System.Xml.Serialization;  
 
using Microsoft.SharePoint;  
using Microsoft.SharePoint.WebControls;  
using Microsoft.SharePoint.WebPartPages;  
using System.Web.UI.WebControls;  
using Telerik.Web.UI;  
 
namespace WebPartRadWindow  
{  
    [Guid("0fb0a390-4eb4-48ec-9d58-ff546c4f8928")]  
    public class WebPartRadWindow : System.Web.UI.WebControls.WebParts.WebPart  
    {  
        public WebPartRadWindow()  
        {  
            this.ExportMode = WebPartExportMode.All;  
        }  
 
        protected override void OnInit(EventArgs e)  
        {  
            base.OnInit(e);  
 
            AddScriptManager();  
            AddRadWindowManager();  
        }  
 
        protected override void OnLoad(EventArgs e)  
        {  
            base.OnLoad(e);  
 
            AddOpenRadWindowScript();  
        }  
 
 
        protected override void Render(HtmlTextWriter writer)  
        {  
            writer.Write("RadWindow postion test");  
 
            for (int i = 0; i < 30; i++)  
            {  
                writer.WriteBreak();  
            }  
 
            writer.Write("<button onclick='OpenRadWindow();return false;' class='Button'>Open window</button>");  
        }  
 
        private void AddScriptManager()  
        {  
            if (ScriptManager.GetCurrent(Page) == null)  
                Page.Form.Controls.AddAt(0, new ScriptManager());  
        }  
 
        private void AddRadWindowManager()  
        {  
            RadWindowManager windowManager = new RadWindowManager();  
            windowManager.ID = "RadWindowManager1";  
            windowManager.DestroyOnClose = true;  
 
            Page.Form.Controls.Add(windowManager);  
        }  
 
        private void AddOpenRadWindowScript()  
        {  
            ScriptManager.RegisterStartupScript( this, GetType(), "OpenRadWindow" 
                                               , "function OpenRadWindow()" 
                                               + "{" 
                                               + "    var oWindow = GetRadWindowManager().getWindowByName('TestWindow');" 
                                               + "    if (oWindow != null)" 
                                               + "        oWindow.close();" 
                                               + "    oWindow = radopen('http://www.telerik.com', 'TestWindow');" 
                                               //+ "    oWindow.moveTo(0, 0);"  
                                               + "}" 
                                               , true);  
        }  
    }  
}  
 


ASPX page (default.aspx.cs file)
using System;  
using System.Data;  
using System.Configuration;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
 
using Telerik.Web.UI;  
 
public partial class _Default : System.Web.UI.Page   
{  
    protected override void  OnInit(EventArgs e)  
    {  
         base.OnInit(e);  
 
        AddScriptManager();  
        AddRadWindowManager();  
    }  
 
    protected override void OnLoad(EventArgs e)  
    {  
        base.OnLoad(e);  
        AddOpenRadWindowScript();  
    }  
 
    protected override void Render(HtmlTextWriter writer)  
    {  
        base.Render(writer);  
 
        writer.Write("RadWindow postion test");  
 
        for (int i = 0; i < 30; i++)  
        {  
            writer.WriteBreak();  
        }  
 
        writer.Write("<button onclick='OpenRadWindow();return false;' class='Button'>Open window</button>");  
    }  
 
 
    private void AddScriptManager()  
    {  
        if (ScriptManager.GetCurrent(Page) == null)  
            Page.Form.Controls.AddAt(0, new ScriptManager());  
    }  
 
    private void AddRadWindowManager()  
    {  
        RadWindowManager windowManager = new RadWindowManager();  
        windowManager.ID = "RadWindowManager1";  
        windowManager.DestroyOnClose = true;  
 
        Page.Form.Controls.Add(windowManager);  
    }  
 
    private void AddOpenRadWindowScript()  
    {  
        ScriptManager.RegisterStartupScript( this, GetType(), "OpenRadWindow" 
                                           , "function OpenRadWindow()" 
                                           + "{" 
                                           + "    var oWindow = GetRadWindowManager().getWindowByName('TestWindow');" 
                                           + "    if (oWindow != null)" 
                                           + "        oWindow.close();" 
                                           + "    oWindow = radopen('http://www.telerik.com', 'TestWindow');" 
                                           //+ "    oWindow.moveTo(0, 0);"  
                                           + "}" 
                                           , true);  
    }  
}  
 

Put the web part on a WSS 3.0 site, reduce the height of the browser window to get a vertical scoll bar, scroll down and click the "Open Window" button : the RadWindow is not centerd (displayed way to low). Do the same with the aspx page : the window is centered correctly.

I also noticed a different behaviour between SharePoint and ASP.NET page when positioning a RadWindow from within client code (moveTo function on window object in javascript):
  • When you position a RadWindow from an ASP.NET page the coordinates are relative to the HTML document : 0, 0 is the upper left point of the HTML document, even when the document is scrolled (in this case when executing a moveTo(0, 0) part or the whole of the RadWindow is off screen).
  • When you execute the same function from a web part the coordinates are relative to the screen (or viewport) not to the HTML document: 0, 0 is the upper left corner of the screen, if the document is scrolled, a moveTo(0, 0) results in a RadWindow that is positioned in the upper left corner of the screen and that is always visible even when the document is scrolled.

To see the difference in behavior, uncomment the oWindow.moveTo(0, 0) lines in the web part and the ASP.NET code. Probably the reason for the error in centering has the same origin as the positioning difference.

Is there any solution for having the RadWindow centered correctly in both web parts and ASP.NET pages and controls ? For web parts, I now calculate the top left postion of the window in order to have it centered in client code and use a moveTo, but this is sometimes a little bit awkward.

Kind regards,

Igor De Rycke
Igor
Top achievements
Rank 1
 answered on 18 Feb 2009
15 answers
430 views
When are you guys going to release a Native 3.5 version of Prometheus for VS2008 RTM? Ot alternatively, how can I get the current version to work with VS2008 RTM without installing the earlier standalone MS AJAX.NET?
vtech
Top achievements
Rank 1
 answered on 18 Feb 2009
1 answer
99 views
Hello!

It's possible perform in grid ,,column-based,, grouping?

I am thinking about something like here:

http://demos.telerik.com/aspnet-ajax/grid/examples/groupby/grouploadmodeclient/defaultcs.aspx ,

but I need Country (Argentina, Austrial, Belgium...) to be a columns. For better visualization maybe look here:

http://dl.getdropbox.com/u/481633/mulitcolumntable.jpg

Regards,
Tom





Shinu
Top achievements
Rank 2
 answered on 18 Feb 2009
2 answers
81 views
Hi ,

When i click edit button on GridView, the clicked row is sometimes is getting cleared(Freezing).Can anyone help me.
Please check the following link.Thank you.

http://www.freeimagehosting.net/image.php?8dee2107bc.jpg


Nikolay Rusev
Telerik team
 answered on 18 Feb 2009
3 answers
101 views
Hi,

I have a strange problem that appear in only some pages and I'm not able to understand why.

I build my grid with my query with the _NeedDataSource event.
            MyGrid.DataSource = GetDataTable(MySqlString)

I use a client selection.
On client selection with evet _ItemCommand I redirect on another page with:
...
                Response.BufferOutput = True
                Response.Redirect("~/User/MyNewPage.aspx", False)
...

All works fine.

But if I go back with explorer browser button and I click to select another row of a grid nothing appens!

The page_load (_init and so on) are not fired. No one event of page is fired.

If I ask a refresh from browser (F5) or click on a button with inside
            MyGrid.Rebind

everythink works again!

What I'm making wrong? :)

thanks

Renato
RRE
Top achievements
Rank 2
Iron
 answered on 18 Feb 2009
0 answers
86 views

How to populate the Radconfirmation when click the Tree view context menu item, if I clicked “ok” button then I wanted to redirect to another page.  But my problem is if i click the Tree view context menu item, Radconfirmation is showing, at this time page is redirect to another page without clicking the Radconfirmation “ok” button.

Any solution for this…
Guna
Top achievements
Rank 1
 asked on 18 Feb 2009
2 answers
77 views
Hi,

I am building a control in a timeline view. I want to have my resources listed on the left most column one below the other. For any assignments to these resources, should be displayed on the right of it. A assignment would be displayed as a horizontal bar for the resource assigned.
How is this possible in RadScheduler control?
If it is not possible with RadScheduler control then only option for me is to have a resource column display dynamically and for each resource dymamically create a RadScheduler control and give assignments to it. I know this is a very costly affair from performance point of view but I have no other go!!!
Vijay
Top achievements
Rank 1
 answered on 18 Feb 2009
1 answer
88 views
Hi,

I have hierarchical grid which has one record in the master table and while adding a child record for this master record, the grid is again getting collapsed. this is because i am calling the need data source and detail table bind method after add function. Once  a record is added in the child table(details table) only user control should get closed, the expand state should be maintained, so that user can add another record.
Expecting a quick reply
Thanks
Shinu
Top achievements
Rank 2
 answered on 18 Feb 2009
4 answers
78 views
i have list box in ascx.cs ..in edit mode the selected values are not binding in list box..is tr any to bind by coding or someother option...
Princy
Top achievements
Rank 2
 answered on 18 Feb 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?