Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
75 views
Hi,

Unlike the demos, when I create a docking application, dragging it around in IE is very jerkey. If I move the mouse around fast then the dock does not follow till I stop, else, if I move the mouse very slowly, it will follow but not very smooth at all. It seems perfectly fine in Firefox.

The reason I question it is that the demos move quite smooth in my IE. could I be doing something wrong?

I'm using IE7 and Firefox 2 on a Core2 duo 2.2ghz, 2gb ram. I think performance should not be an issue.

Cheers,
Kia
Kia
Top achievements
Rank 1
 answered on 20 Mar 2008
2 answers
181 views
Is it possible to have different values for FirstDayOfWeek for the week view and month view?  I would like to show a 5 day work week in the week view, but in the month view it looks strange to have the weekends missing, so I want to show all days there.

TIA
Rob Teegarden
Top achievements
Rank 1
 answered on 19 Mar 2008
4 answers
231 views
I am using a prometheus radGrid.  I have the Add New Record and refresh links at the top since I have this property set like:

CommandItemDisplay

="Top"

My question is, how do I remove the Refresh link?  I just want the Add New Record to appear.

Thanks,
Bob

Bob
Top achievements
Rank 1
 answered on 19 Mar 2008
8 answers
191 views
I would like to display 'Contacts' on the sliding pane when collapsed but display a longer title at the top when expanded 'Contacts for John Smith'. The reason is I need to identify who the contacts are for but I don't want the long title along the side of my splitter when it's collapsed. It would be nice to see ExpandedTitle and CollapsedTitle properties.
Nancy Cara
Top achievements
Rank 1
 answered on 19 Mar 2008
1 answer
163 views
Hello,

2 questions please :

1) How do i configure the scheduler to place appointments for half an hour,
    example : from 12:00 to 12:30.

    does the scheduler allow to work only with "complete hours"?

2) Do i have the ability to configure the AdvancedFrom,i mean for example:

    hiding the "All Day Event" CheckBox ?

thank you.
Peter
Telerik team
 answered on 19 Mar 2008
3 answers
185 views
Hi,

I am trying to accomplish what I thought was a relatively simple task - programmatically setting the selected item, and I cannot get it to work.

Prior to my user attempting to change the selection in the combobox, I have to check whether they are allowed to or not (they may not have filled in everything required for example), so I have hooked up the OnClientSelectedIndexChanging event and am checking if they can change the selection or not in this event.  If they are not allowed to change, I am saving the index of the item they requested, cancelling the selectionchanging event and prompting them.  If they choose a certain answer I wish to allow the new selection to be allowed so then try to select the index of the item they originally selected.  I have tried this the following ways:

pageList.set_selectedIndex( pageIndexToLoad );  
 
pageList.set_selectedItem( pageList.get_items().getItem( pageIndexToLoad ) );  
 

Both correctly set the selected index/item of the combobox, but neither actually change the combobox to the respective item - it is left displaying the original item.  What am I missing?

Thanks in advance.
Jonathan
Top achievements
Rank 1
 answered on 19 Mar 2008
4 answers
118 views
Hi,

I couldn't find the TabStrip control in the upcoming Prometheus controls.

In case its not available, do we need to busy separate licences for Promethus and Rad Tabstrip.

Please clarify.

Best regards
Farrukh
mfmz
Top achievements
Rank 1
 answered on 19 Mar 2008
3 answers
188 views
I am using the RadUpload Prometheus controls in a multiview control. I configured the skin to be Office2007 and I am getting two undesirable results.

First and foremost, How do I get rid of the black squares on the left side of the control? and second, how can I change the border color to be nothing, or at the very least, the same color as the background. the border-color argument is overwritten by the skin cssclass.

Thank you,

John

Sophy
Telerik team
 answered on 19 Mar 2008
8 answers
438 views
Hi,

I'm working on the PortalSiteCS example provided by Telerik. 

I have updated one of the widgets to contain a label, a textbox and a button.  This is what I want: when the user types something into the textbox and clicks the button the label should be updated with the new value and in the database the value of Configuration should be updated with the new value.

For this to happen I trigger a postback when the user clicks the button inside the dock.  The button bubbles up an event to the parent - default page.  The default page gets the ID of the dock and the value of the label.  I enclosed DockLayout in and UpdatePanel and here I call update() on it hoping to trigger postback but that doesn't happen!  The new value is saved to the database so a second click on the button inside the dock does refresh the value of the label. 

Any clues as to why this is happening? I've attached code below:

Thanks.

Default.aspx
<asp:scriptmanager runat="server" id="ScriptManager1">  
</asp:scriptmanager> 
Widget Configuration:  
<asp:textbox maxlength="20" runat="server" id="TextConfiguration"></asp:textbox> 
<asp:dropdownlist runat="server" id="ListWidgets">  
</asp:dropdownlist> 
<asp:button runat="server" id="ButtonAddDock" text="Add Dock" onclick="ButtonAddDock_Click" /> 
 
 
 
<asp:UpdatePanel ID="ParentUpdatePanel" runat="server" ChildrenAsTriggers="false" UpdateMode="Conditional" > 
    <ContentTemplate> 
        <telerik:raddocklayout id="DockLayout" runat="server" onloaddocklayout="DockLayout_LoadDockLayout" 
            onsavedocklayout="DockLayout_SaveDockLayout" storelayoutinviewstate="false">  
            <div> 
                <telerik:raddockzone runat="server" id="ZoneLeft" style="float: left; margin-right: 10px;" 
                    width="45%" minheight="200px">  
                </telerik:raddockzone> 
                <telerik:raddockzone runat="server" id="ZoneRight" style="float: left;" minheight="200px" 
                    width="45%">  
                </telerik:raddockzone> 
            </div> 
            <div style="display: none">  
                <asp:updatepanel runat="server" id="UpdatePanel1">  
                    <triggers> 
                        <asp:asyncpostbacktrigger controlid="ButtonAddDock" eventname="Click" /> 
                    </triggers> 
                </asp:updatepanel> 
            </div> 
        </telerik:raddocklayout> 
   </ContentTemplate>                    
</asp:UpdatePanel> 
 

Default.aspx.cs
public partial class _Default : System.Web.UI.Page  
{  
    int PageID = 1;  
    List<PageWidgetInfo> _pageWidgets;  
 
    protected List<PageWidgetInfo> PageWidgets  
    {  
        get  
        {  
            if (_pageWidgets == null)  
            {  
                _pageWidgets = PageWidgetInfo.SelectPageWidgets(PageID);  
                _pageWidgets.Sort();  
            }  
            return _pageWidgets;  
        }  
    }  
 
    protected override void OnInit(EventArgs e)  
    {  
        foreach (PageWidgetInfo pageWidget in PageWidgets)  
        {  
            RadDock dock = CreateDock(pageWidget);  
 
            DockLayout.Controls.Add(dock);  
 
            CreateSaveStateTriggers(dock);  
        }  
        base.OnInit(e);  
    }  
 
    protected override void OnLoad(EventArgs e)  
    {  
        ScriptManager1.RegisterAsyncPostBackControl(TriggerAsyncPostback);  
 
        if (!IsPostBack)  
        {  
            ListWidgets.DataSource = WidgetInfo.Select();  
            ListWidgets.DataTextField = "Name";  
            ListWidgets.DataValueField = "ID";  
            ListWidgets.DataBind();  
        }  
 
        base.OnLoad(e);  
    }  
 
    protected RadDock CreateDock(PageWidgetInfo pageWidgetInfo)  
    {  
        RadDock dock = new RadDock();  
        dock.ApplyState(DockState.Deserialize(pageWidgetInfo.State));  
        dock.ID = pageWidgetInfo.ID.ToString();  
        dock.Tag = pageWidgetInfo.ID.ToString();  
 
        BaseWidget widget = LoadControl(pageWidgetInfo.Path) as BaseWidget;  
        if (widget == null)  
        {  
            throw new Exception(string.Format("The UserControl with path '{0}' does not inherit from BaseWidget. All widgets must inherit from BaseWidget.", pageWidgetInfo.Path));  
        }  
        widget.Configuration = pageWidgetInfo.Configuration;  
        dock.ContentContainer.Controls.Add(widget);  
          
 
        //Currently, there is a problem with the RadDock command items:  
        // if they are not explicitly created, the Command event it not fired.  
        dock.Commands.Add(new DockCloseCommand());  
        dock.Commands.Add(new DockExpandCollapseCommand());  
        dock.Command += new DockCommandEventHandler(Dock_Command);  
 
        return dock;  
    }  
 
    protected RadDock CreateDock(int widgetID, string widgetConfiguration)  
    {  
        WidgetInfo widget = WidgetInfo.Select(widgetID);  
        if (widget == null)  
        {  
            throw new Exception(string.Format("Cannot find a Widget with ID={0}.", widgetID));  
        }  
        PageWidgetInfo newPageWidget = PageWidgetInfo.Insert(PageID, widgetID, widgetConfiguration, string.Empty);  
        PageWidgets.Add(newPageWidget);  
 
        RadDock dock = CreateDock(newPageWidget);  
        dock.Title = widget.Name;  
 
        return dock;  
    }  
 
    protected void Dock_Command(object sender, DockCommandEventArgs e)  
    {  
        if (e.Command.Name == "Close")  
        {  
            ScriptManager.RegisterStartupScript(  
                UpdatePanel1,  
                this.GetType(),  
                "RemoveDock",  
                string.Format("function _removeDock() {{" +  
                    "Sys.Application.remove_load(_removeDock);" +  
                    "$find('{0}').undock();" +  
                    "$get('{1}').appendChild($get('{0}'));" +  
                    "$find('{0}').doPostBack('DockPositionChanged');" +  
                    "}};" +  
                    "Sys.Application.add_load(_removeDock);", ((RadDock)sender).ClientID, UpdatePanel1.ClientID),  
                true);  
        }  
    }  
 
    private PageWidgetInfo FindWidget(int id)  
    {  
        foreach (PageWidgetInfo info in PageWidgets)  
        {  
            if (info.ID == id) return info;  
        }  
        return null;  
    }  
 
    protected void DockLayout_SaveDockLayout(object sender, DockLayoutEventArgs e)  
    {  
        foreach (DockState state in DockLayout.GetRegisteredDocksState())  
        {  
            int stateWidgetID = int.Parse(state.Tag);  
 
            PageWidgetInfo pageWidget = FindWidget(stateWidgetID);  
            if (pageWidget != null && !state.Closed)  
            {  
                pageWidget.State = state.ToString();   
                pageWidget.Update();  
            }  
            else  
            {  
                PageWidgetInfo.Delete(stateWidgetID);  
            }  
        }  
    }  
 
    private void CreateSaveStateTriggers(RadDock dock)  
    {  
        dock.AutoPostBack = true;  
        dock.CommandsAutoPostBack = true;  
 
        AsyncPostBackTrigger saveStateTrigger = new AsyncPostBackTrigger();  
        saveStateTrigger.ControlID = dock.ID;  
        saveStateTrigger.EventName = "DockPositionChanged";  
        UpdatePanel1.Triggers.Add(saveStateTrigger);  
 
        saveStateTrigger = new AsyncPostBackTrigger();  
        saveStateTrigger.ControlID = dock.ID;  
        saveStateTrigger.EventName = "Command";  
        UpdatePanel1.Triggers.Add(saveStateTrigger);  
    
    }  
 
    protected void ButtonAddDock_Click(object sender, EventArgs e)  
    {  
        RadDock dock = CreateDock(int.Parse(ListWidgets.SelectedValue), TextConfiguration.Text);  
 
        UpdatePanel1.ContentTemplateContainer.Controls.Add(dock);  
 
        CreateSaveStateTriggers(dock);  
 
        ScriptManager.RegisterStartupScript(  
            dock,  
            this.GetType(),  
            "AddDock",  
            string.Format(@"function _addDock() {{" +  
                "Sys.Application.remove_load(_addDock);" +  
                "$find('{1}').dock($find('{0}'));" +  
                "$find('{0}').doPostBack('DockPositionChanged');" +  
                "}};" +  
                "Sys.Application.add_load(_addDock);", dock.ClientID, ZoneLeft.ClientID),  
            true);  
    }  
 
    protected void DockLayout_LoadDockLayout(object sender, DockLayoutEventArgs e)  
    {  
        foreach (PageWidgetInfo pageWidget in PageWidgets)  
        {  
            e.Indices[pageWidget.DockState.UniqueName] = pageWidget.DockState.Index;  
            e.Positions[pageWidget.DockState.UniqueName] = pageWidget.DockState.DockZoneID;  
        }  
    }  
 
    protected override bool OnBubbleEvent(object source, EventArgs e)  
    {  
        Type type = source.GetType();  
        string souceName = type.ToString();  
 
        if ((e is CommandEventArgs) && souceName.Equals("System.Web.UI.WebControls.Button"))  
        {  
            Button temp = (Button)source;  
            if(temp.ID.Equals("Button1"))  
            {  
                TriggerAsyncPostback_Click(source, e);  
            }  
 
            return true;  
        }  
        return false;  
    }    
 
    protected void TriggerAsyncPostback_Click(object sender, EventArgs e)  
    {  
        CommandEventArgs args = (CommandEventArgs)e;  
        string configuration = (string)args.CommandArgument;  
        string ID = (string)args.CommandName;  
 
        //recreate it with the new data  
        PageWidgetInfo pageWidgetInfo = FindWidget(int.Parse(ID));  
        pageWidgetInfo.Configuration = configuration;  
 
        //delete all docks from the zones  
        foreach (RadDockZone zone in DockLayout.RegisteredZones)  
        {  
            zone.Controls.Clear();  
        }  
 
        //update DockLayout by updating the panel         
        ParentUpdatePanel.Update();  
    }  
} 



Lina
Top achievements
Rank 1
 answered on 19 Mar 2008
1 answer
100 views
Hi,

I found an error returned with the event from server when I was creating a Personal Site. The error ids were 5187 and 6151. We activated the RadEditor feature when the personal site is created. In our test case, if we create a few sites at the same time, it will be sucessful. But if we create many sites at the same time (12 sites/min), it always return an error.

The error message :

Microsoft.Office.Server.UserProfiles.PersonalSiteCreateException: A failure was encountered while attempting to create the site. ---> System.IO.IOException: The process cannot access the file 'C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\CONTROLTEMPLATES\RadEditorList.ascx' because it is being used by another process.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)

at Telerik.SharePoint.RadEditorFeature.RadFeatureReceiver.FeatureActivated(SPFeatureReceiverProperties properties)

at Microsoft.SharePoint.SPFeature.DoActivationCallout(Boolean fActivate, Boolean fForce)

at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, Boolean fForce)
...

Best Regards,
lee

George
Telerik team
 answered on 19 Mar 2008
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?