Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
105 views
I open my Rad Editor in a popup rad window using top.radopen because I want the popup to open on top of the entire web page, as oposed to within the splitter frame that contains the opener. I have noticed this causes some undesireable effects with the editor dialogs.

The biggest problem has to do with the track changes dialog.  Unlike the others (like the File Managers, property dialogs, etc.), this does not open in it's own rad window, but rather loads in the same rad window the editor is already in. So, basically I lose the previous rad editor screen and can't get it back.

Of lesser importance, but still a bit of an annoyance, is that the other dialogs (all of them, to my knowledge), open in their own rad window, and on top of the editor rad window, however, they are all contained within the frame of the editor rad window. Some of the dialogs are nearly as, or even a little larger than, my editor window, so they get cut off and the user can't drag them outside of the bounds of the editor rad window. It would be a better experience if these dialogs opened in their own window (as they do now), but also on top of and out of the frame of the editor's rad window, and therefore would be able to move freely around the screen. I'm sure that this might be complicated given that these dialogs must communicate with the frame that opened them, but perhaps there is some way of achieving this? Or maybe there is a better way for me to open the Editor Rad window?
Rumen
Telerik team
 answered on 08 Jun 2009
4 answers
226 views

Can anybody help me to create raddocks like netvibes?
e.g.
i ve some static docks and i want to create some dynamic docks based on by requirement.

i want to create duplicate docks of static and dynamic both.

All docks states needs to store into database based on users ID.

Whenever user logs in, Users earlier configurations needs to show into the page.


NIRAKAR
Top achievements
Rank 1
 answered on 08 Jun 2009
2 answers
117 views
Hi,

We use the RAD Editor in our application but today I've found a problem.
When I go to source mode and type the following line:

For<script>alert("Bug!");</script>after

and next switch to design mode I see the text "Forafter".
The script tags have been removed and when I save it and look at the source code in IE, I see the following:

value="Forafter"

But when I type the same line again in de source mode and save it directly (without going to design mode) and look at the source code of the page in IE, I see the following:

value="For&lt;script>alert(&quot;Bug!&quot;);&lt;/script>after"

Is this a bug? Or do I miss a property?
We use the RAD Editor version 7.02
Ronald
Top achievements
Rank 1
 answered on 08 Jun 2009
3 answers
134 views
I was using Editor lite 4.5.4, it's been working fine till two days ago the toolbar stopped working, the link manager, image manger, insert table box all broken, i am still able to create/edit/delete RadEditor webpart, but I don't know what's going on with the toolbar. I've been stuck on this for two  days, please anyone have any suggestions. I have a screenshot on the site, http://share.mph.net/test/default.aspx, thanks so much!
Stanimir
Telerik team
 answered on 08 Jun 2009
4 answers
414 views
Hello,

I am using a virtual path to load and store my images. I can view this url in my browser to get a list of the directory contents. However, when using this url as view/delete/upload paths in my ImageViewer I get the following exception:

'********' is not a valid virtual path.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80004005): '********' is not a valid virtual path.]
   System.Web.VirtualPath.Create(String virtualPath, VirtualPathOptions options) +8855691
   System.Web.HttpServerUtility.MapPath(String path) +90
   Telerik.Web.UI.Widgets.FileSystemContentProvider.ResolveRootDirectoryAsTree(String path) +33
   Telerik.Web.UI.RadFileExplorer.BindExplorer() +139
   Telerik.Web.UI.RadFileExplorer.OnLoad(EventArgs e) +385
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Control.LoadRecursive() +141
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
Lini
Telerik team
 answered on 08 Jun 2009
1 answer
191 views
Hello Telerik.

I am binding Scheduler to uknown dataset. The information about fields and resources is in a xml file.

Without resources everything is working, I can see appointments.

Resources code list I am generating from original data. Thus my dataset contains two tables (data and one resource code list table) like this:
<NewDataSet> 
<Table> 
  <hasRowRight>1</hasRowRight>   
  <n_nug_typ_id>50047</n_nug_typ_id>   
  <tnt_name>Discussion entry</tnt_name>   
  <author>Adam , [adam@enviss]</author>   
  <n_id>50140</n_id>   
  <n_wgid>5</n_wgid>   
  <n_tid>5</n_tid>   
  <n_code_name>Workflow test</n_code_name>   
  <n_date_created>2008-12-04T16:26:00+01:00</n_date_created>   
  <n_w_name>Discussion entry workflow</n_w_name>   
  <n_p_code_name>enviss</n_p_code_name>   
  <att_50312>etapa</att_50312>   
  <att_50312_key>50738</att_50312_key>   
  <att_50122>Memo</att_50122>   
  <att_50123>true</att_50123>   
  <att_50124>Workflow test</att_50124>   
  <att_50134>2009-06-03T00:00:00+02:00</att_50134>   
  <att_50135>2009-06-16T00:00:00+02:00</att_50135>   
  <att_50136>2009-06-09T00:00:00+02:00</att_50136>   
  <att_50137>2009-06-17T00:00:00+02:00</att_50137>   
  <att_50138>0</att_50138>   
  <att_50132>engineer2@enviss</att_50132>   
  <att_50132_key>50955</att_50132_key>   
  <att_50133>JF</att_50133>   
  <renderStatus>10</renderStatus>   
  </Table> 
<resources0> 
  <att_50132_key>50955</att_50132_key>   
  <att_50132>engineer2@enviss</att_50132>   
  </resources0> 
  </NewDataSet> 

Att_50132_key is is primary key for resources0 table and it is also foreign key in an appointment table TABLE.
Att_50132 is a text description.

My code is:
public void SetData(DataTable dtData)  
        {  
            DataSet ds = dtData.DataSet;  
 
            // datasetHelper implements selectDisctinct method to generate code-lists form existing appointments data. Adds new table to dataset.   
            DataSetHelper dsh = new DataSetHelper(ref ds);  
            XmlElement xeResources;  
            XmlElement xeResource;  
            string keyAttribute, valueAttribute;  
            ResourceType rt;  
 
            xeResources = (XmlElement) this.xeProperties.SelectSingleNode("//resources");  
 
            // existující resources se odstraní, protože dvojí pÅ™idání stejný resources způsobuje výjimku  
            this.scheduler.ResourceTypes.Clear();  
 
            for (int i = 0; i < xeResources.ChildNodes.Count; i++)  
            {  
                if (xeResources.ChildNodes[i] is XmlElement)  
                {  
                    xeResource = (XmlElement)xeResources.ChildNodes[i];  
                    keyAttribute = xeResource.GetAttribute("keyAttribute");  
                    valueAttribute = xeResource.GetAttribute("codeNameAttribute");  
                    dsh.SelectDistinct("resources" + i.ToString(), dtData, keyAttribute, valueAttribute);  
 
                    // resources databinding  
                    rt = new ResourceType(xeResource.GetAttribute("name"));  
                    rt.DataSource = ds.Tables["resources" + i.ToString()];  
                    rt.KeyField = keyAttribute;  
                    rt.ForeignKeyField = keyAttribute;  
                    rt.TextField = valueAttribute;  
                    this.scheduler.ResourceTypes.Add(rt);                     
                }  
            }  
              
            this.dtData = dtData;  
 
            // appointments databanding  
            this.scheduler.DataSource = dtData;  
 
            // one extra attribute no problem with this  
            this.scheduler.Attributes["n_nug_typ_id"] = "n_nug_typ_id";  
            this.scheduler.DataBind();  
        }  
 

This produces an error

Invalid member name.   
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.   
 
Exception Details: System.ArgumentException: Invalid member name.  
 
Source Error:   
 
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.    
 
Stack Trace:   
 
 
[ArgumentException: Invalid member name.]  
   System.ComponentModel.MemberDescriptor..ctor(String name, Attribute[] attributes) +157  
   System.ComponentModel.PropertyDescriptor..ctor(String name, Attribute[] attrs) +9  
   Telerik.Web.UI.Appointment.MapCommonResources(PropertyDescriptorCollection properties) +159  
   Telerik.Web.UI.Appointment.MapAttributesAndResourcesToProperties(PropertyDescriptorCollection originalProperties) +236  
   Telerik.Web.UI.Appointment.System.ComponentModel.ICustomTypeDescriptor.GetProperties() +27  
   System.ComponentModel.MergedTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetProperties() +14  
   System.ComponentModel.TypeDescriptor.GetPropertiesImpl(Object component, Attribute[] attributes, Boolean noCustomTypeDesc, Boolean noAttributes) +68  
   System.ComponentModel.TypeDescriptor.GetProperties(Object component) +10  
   System.Web.UI.DataBinder.GetPropertyValue(Object container, String propName) +53  
   System.Web.UI.DataBinder.Eval(Object container, String[] expressionParts) +92  
   System.Web.UI.DataBinder.Eval(Object container, String expression) +106  
   Telerik.Web.UI.Scheduling.AppointmentTemplate._recurrenceIcon_DataBinding(Object sender, EventArgs e) +49  
   System.Web.UI.Control.OnDataBinding(EventArgs e) +99  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +92  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   System.Web.UI.Control.DataBindChildren() +211  
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +102  
   System.Web.UI.Control.DataBind() +15  
   Telerik.Web.UI.RadScheduler.CreateChildControls(Boolean bindFromDataSource) +430  
   Telerik.Web.UI.RadScheduler.CreateChildControls() +10  
   System.Web.UI.Control.EnsureChildControls() +87  
   System.Web.UI.Control.PreRenderRecursiveInternal() +44  
   System.Web.UI.Control.PreRenderRecursiveInternal() +171  
   System.Web.UI.Control.PreRenderRecursiveInternal() +171  
   System.Web.UI.Control.PreRenderRecursiveInternal() +171  
   System.Web.UI.Control.PreRenderRecursiveInternal() +171  
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842  
 
   
 

what I am doing wrong?

Thank you very much.

Tom
Peter
Telerik team
 answered on 08 Jun 2009
1 answer
170 views
Calling ExtractValuesFromItem produces an empty dictionary when I utilize the RadGrid w/ EditFormSettings.  I need to set the values of the controls in my FormTemplate on the server, but I'm not able to as the dictionary is empty.  Is there a specific property I need to set on the grid to allow me to do this?
void drgGrid_ItemDataBound(object sender, GridItemEventArgs e) 
            if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
            { 
                GridEditableItem item = (GridEditableItem)e.Item; 
                HybridDictionary extractedVals = new HybridDictionary(); 
                e.Item.OwnerTableView.ExtractValuesFromItem(extractedVals, item); 
            } 

Here's the markup of my Grid:

<cym:RadGrid ID="drgGrid" runat="server" DataSourceID="drgODS"
        <ClientSettings Selecting-AllowRowSelect="true" /> 
        <MasterTableView DataKeyNames="DrgID" AlternatingItemStyle-HorizontalAlign="Center" 
            ItemStyle-HorizontalAlign="Center" CommandItemDisplay="Top">             
            <Columns> 
                <rad:GridBoundColumn DataField="RV" Visible="false" ReadOnly="true"  
                    ForceExtractValue="Always" /> 
                <rad:GridBoundColumn DataField="ValidfromDate" HeaderText="Valid From"  
                    ForceExtractValue="Always" ReadOnly="true" Visible="false" />                 
                <rad:GridBoundColumn DataField="ValidThroughDate" HeaderText="Valid Through"  
                    ForceExtractValue="Always" ReadOnly="true" Visible="false" /> 
                <rad:GridBoundColumn DataField="DrgType" HeaderText="Type"  
                    ForceExtractValue="Always" ReadOnly="true" Visible="false" />          
                <rad:GridBoundColumn DataField="Description" HeaderText="Description" 
                    ForceExtractValue="Always" ReadOnly="true" Visible="false" />                     
                <rad:GridBoundColumn DataField="DrgCode" HeaderText="Code" ReadOnly="true"  
                    HeaderStyle-Width="100px" ForceExtractValue="Always" /> 
                <rad:GridBoundColumn DataField="Version" HeaderText="Version" ReadOnly="true"  
                    HeaderStyle-Width="90px" ForceExtractValue="Always" />                 
                <rad:GridTemplateColumn HeaderText="Type" SortExpression="DrgType" 
                    HeaderStyle-Width="70px"
                    <ItemTemplate> 
                        <%#Eval("DrgType") %> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <cym:RadComboBox ID="typeDdl" runat="server" /> 
                    </EditItemTemplate> 
                </rad:GridTemplateColumn>                                             
                <rad:GridTemplateColumn HeaderText="Description" UniqueName="Description" 
                    ItemStyle-HorizontalAlign="Left" HeaderStyle-Width="300px"
                    <ItemTemplate> 
                        <%#Eval("Description") %> 
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <asp:TextBox ID="descriptionTb" runat="server" /> 
                        <asp:RequiredFieldValidator ID="descriptionReqVldtr" runat="server" 
                            ControlToValidate="descriptionTb" ErrorMessage="* Required."  
                            Display="Dynamic" /> 
                    </EditItemTemplate> 
                </rad:GridTemplateColumn> 
                <rad:GridTemplateColumn HeaderText="Valid From" SortExpression="ValidfromDate"
                    <ItemTemplate> 
                        <%# DataBinder.Eval(Container.DataItem,  
                                "ValidfromDate", "{0:MM/dd/yyyy}") %>                         
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <rad:RadDatePicker ID="fromDateDp" runat="server"  
                            EnableEmbeddedSkins="false" Skin="Cymetrix" />                         
                        <asp:RequiredFieldValidator ID="fromDateReqVldtr" runat="server" 
                            ControlToValidate="fromDateDp" ErrorMessage="* Required."  
                            Display="Dynamic" /> 
                    </EditItemTemplate> 
                </rad:GridTemplateColumn>                 
                <rad:GridTemplateColumn HeaderText="Valid Through" SortExpression="ValidThroughDate"
                    <ItemTemplate> 
                        <%# DataBinder.Eval(Container.DataItem,  
                                "ValidThroughDate", "{0:MM/dd/yyyy}") %>                         
                    </ItemTemplate> 
                    <EditItemTemplate> 
                        <rad:RadDatePicker ID="throughDateDp" runat="server"  
                            EnableEmbeddedSkins="false" Skin="Cymetrix" />                         
                        <asp:CompareValidator ID="throughDateCmpVldtr" runat="server" 
                            ControlToValidate="throughDateDp" ControlToCompare="fromDateDp"  
                            Type="Date" Operator="GreaterThan" Display="Dynamic"     
                            ErrorMessage="Valid Through must be less than Valid From." />                     
                    </EditItemTemplate> 
                </rad:GridTemplateColumn>                 
                <rad:GridEditCommandColumn />                 
                <rad:GridButtonColumn ButtonType="LinkButton" Text="Remove" 
                    UniqueName="Remove" CommandName="Remove" ItemStyle-HorizontalAlign="Center"  
                    HeaderStyle-Width="60px" />                                                                     
            </Columns>         
            <EditFormSettings EditFormType="Template"
                <FormTemplate> 
                    <asp:Panel ID="codePnl" runat="server" CssClass="row"
                        <span class="prompt">Code</span> 
                        <div class="data"
                            <asp:TextBox ID="codeTb" runat="server" /> 
                            <asp:RequiredFieldValidator ID="codeReqVldtr" runat="server" 
                                ControlToValidate="codeTb" /> 
                        </div> 
                    </asp:Panel> 
                    <asp:Panel ID="versionPnl" runat="server" CssClass="row"
                        <span class="prompt">Version</span> 
                        <div class="data"
                            <asp:TextBox ID="versionTb" runat="server" MaxLength="3" /> 
                            <asp:RequiredFieldValidator ID="versionReqVldtr" runat="server" 
                                ControlToValidate="versionTb" /> 
                        </div> 
                    </asp:Panel>                     
                </FormTemplate> 
            </EditFormSettings>                                                   
        </MasterTableView>                 
    </cym:RadGrid> 

Daniel
Telerik team
 answered on 08 Jun 2009
3 answers
185 views
Hello,

I'm attempting to change the default font from Times New Roman to Verdana in the RadHtmlField. I'm using the JavaScript technique in http://www.telerik.com/community/forums/sharepoint-2003/controls/change-default-font-for-moss-rad-editor.aspx and http://www.telerik.com/help/aspnet/editor/settingdefaultfont.html. I don't want the change to apply across all web applications on my server so I'm using the ConfigFile property of RadHtmlField. My config file is living in /_layouts/1033.

This doesn't appear to work at all. I'm not even sure if my config file is being read.

Any thoughts?

Thanks, Alex.
Stanimir
Telerik team
 answered on 08 Jun 2009
4 answers
121 views
So far the entire controll set has been functioning like a dream.
However, when nearing the end of the PoC we tested with larger appointments spanning a lot more cells and got a rather annoying result.
** Tested in both Firefox and IE
 
http://greynet.nl/images/telerik/annoying.png

The online demo http://demos.telerik.com/aspnet-ajax/scheduler/examples/timelineview/defaultcs.aspx also displays the same odd behavior when 7 slots are selected, and the appointment is dragged over all 7 sets.

http://greynet.nl/images/telerik/alsoindemo.png

Pretty sure on what causes it to.
When using the property "width" in percentage mode, it only uses the actual cell width, it does not take into account the width of the border line.
A simple explanation would be, say you have a grid of 50 columns, each column beeing 10px long devided by a default (1px) solid border. Now to span all those 50 columns, the scheduler simply says "width: 5000%".
So it draws a appointment of 50*34px = 1700px.
I trust you see the issue, the border is not taken into the calculation here, thus the appointment is 50px short.
The problem becomes more prominent with larger border values.
Here is a screenshot of the same screen with the border-style disabled through CSS.

http://greynet.nl/images/telerik/borders-disabled.png

Any thoughts on how to effectivly solve this without having to to recalculate the effective width's of each appointment?

Made myself a quick patch (Though this really is not the way Id like to resolve it)
function fixAppointmentWidth() { 
    // retrieve all the divs in the page (A lot) 
    var divs = document.getElementsByTagName("div"); 
     
    // loop the divs 
    for (i in divs) { 
        // retrieve the divs class name 
        divclass = divs[i].className
        // check if the classname matches an appointment class (For some reason IE needs a space behind the class name, no clue as to why) 
        if((divclass == "rsApt ") || (divclass == "rsApt")) { 
            // get the current cell width (Which is going to be a percentage) 
            var cellwidth   = divs[i].style.width; 
            // strip the % and devide the remainder by 100 to fetch the ammount of cells the appointment is supposed to span 
            var cells       =   (cellwidth.substr(0,(cellwidth.length -1 )) / 100); 
            // fetch the current (real) pixel value clientwidth 
            var clientwidth = divs[i].clientWidth; 
 
            // Reset the width to clientWidth + cellcount. (This offcourse assumes the border is 1px as it generally is) 
            divs[i].style.width = (clientwidth + cells) + "px"
        } 
    } 
Adding this to the page bottom as well as registering it as the "ClientEvents-OnResponseEnd" of the ajaxmanager auto fixes the issue.
still, not the way i like to resolve it :)
Arpad
Top achievements
Rank 1
 answered on 08 Jun 2009
3 answers
115 views
I am trying to get the Full Featured RadEditor for SharePoint to allow special tags and scripts.  I have a simple onclick statement to add to a DIV tag <div onclick="">.  The editor continues to strip this out.  I have read the documentation and have added the AllowScripts = true to the Config.XML file and also added the property AllowSpecialTags = true to the Page Layout that contains the RadEditor.  Am I missing something?

Stanimir
Telerik team
 answered on 08 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?