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

I have a custom control type that implements ITemplate and is added to a GridTemplateColumn. I have added an event handler to the literal control that is part of the custom control.
        public void InstantiateIn(System.Web.UI.Control container) 
        { 
            System.Web.UI.LiteralControl c = new System.Web.UI.LiteralControl(); 
            c.DataBinding += new EventHandler(Button_DataBinding); 
 


The first time the page loads, the event handler gets called. However, on Postback the event handler is not called.

Any ideas?

Thanks,
Dewang
Dewang Shah
Top achievements
Rank 1
 answered on 26 Jan 2010
1 answer
120 views
Does anyone have an example of a detailsview or RadGrid that opens a RadWindow from a command button?

Simon
Fiko
Telerik team
 answered on 26 Jan 2010
1 answer
83 views
Hi.
Friends, I can't make sequential loader for My project. I use ascx controls at the project and I need to install them in sequence.

For Example
http://i308.photobucket.com/albums/kk324/EmooTy/ascx.jpg?t=1264004649

-------- My Procect's Codes --------
-Default.aspx-
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="my_project._Default" %> 
<%@ Register src="menu.ascx" tagname="menu" tagprefix="uc1" %> 
<%@ Register src="flash.ascx" tagname="flash" tagprefix="uc2" %> 
<%@ Register src="alt_1.ascx" tagname="alt_1" tagprefix="uc3" %> 
 
<html> 
<body> 
<table > 
        <tr> 
            <td> 
                <uc1:menu ID="menu1" runat="server" /> 
            </td> 
             <td> 
                 <asp:PlaceHolder ID="Ph_flash" runat="server"
                 </asp:PlaceHolder> 
            </td> 
            <td > 
                <asp:PlaceHolder ID="Ph_alt1" runat="server"
                 </asp:PlaceHolder> 
           </td> 
        </tr> 
    </table> 
</body> 
</html> 
-Default.aspx.Cs -  
 public void yuklendi_flash() 
        { 
            Control flash_ascx = Page.LoadControl("flash.ascx"); 
            Ph_flash.Controls.Add(flash_ascx); 
            ////Panel1.Controls.Add(flash_ascx); 
        } 
 
        


-Menu.ascx-
<script type="text/javascript" language="javascript" > 
window.onload=<%=flash_yukle()%>
</script> 
-Menu.ascx.CS-
  _Default _default = new _Default(); 
 
        public string flash_yukle() 
        { 
            _default.yuklendi_flash(); 
            return ""; 
        } 






I did it but it didn't run.

Error : http://i308.photobucket.com/albums/kk324/EmooTy/error.gif?t=1264034869

How Can I do ?
Does Telerik  have a feature or Is there a another method ?

My Project's Link: http://hotfile.com/dl/25093592/f357e5f/my_project.rar.html

Note: I'm learning English at the moment. So My English isn't very good.
And I don't know JavaScricpt.

Please. You help me.
Emre Kurt
Top achievements
Rank 1
 answered on 26 Jan 2010
1 answer
126 views
The setup we have is this: we have a DockZone filled with collapsed docks that the user drags out to one of three main dockZones on the page.  When the dock is dropped into the new zone we are firing the DockPositionChanged event. This event flushes out the dock with all of the controls that it needs and loads the usercontrol into the dock. What we are seeing is whenever any event is triggered, the usercontrol inside the dock does an asynpostback or the expandCollapse event is fired so to is the DockPositionChanged event. Also we would really want the master list per say of docks to be repopulated with a fresh copy of the dock that was just dragged out and placed into one of the three zones.

CODE:
This is the master page that has the RadDockLayout
<asp:UpdatePanel ID="upl_Content" runat="server" UpdateMode="Conditional" > 
   <ContentTemplate> 
      <telerik:RadDockLayout ID="RadDockLayout_Content" runat="server" onloaddocklayout="LoadDockLayout" onsavedocklayout="SaveDockLayout">   
         <asp:ContentPlaceHolder ID="ContentPlaceHolderContent" runat="server"></asp:ContentPlaceHolder> 
      </telerik:RadDockLayout>  
   </ContentTemplate>   
<Triggers> 
</Triggers> 
</asp:UpdatePanel> 

Next we build the dockzone with all the available docks
protected void Page_Init(object sender, EventArgs e) 
    GetWidgets(); 
 
        private void GetWidgets() 
        // POPULATE WIDGET SELECTION ZONE 
        { 
            if (WidgetList.Controls.Count == 0) 
            { 
                ArrayList _wigetArray = new ArrayList(); 
                _wigetArray.Add("~/Prototype/Modules/CriticalPrinters/CriticalPrinters.ascx"); 
                _wigetArray.Add("~/Prototype/Modules/CriticalPrinters/CriticalPrinters.ascx"); 
                _wigetArray.Add("~/Prototype/Modules/SMIncidentAge/Services/SMIncidentAge.ascx"); 
                _wigetArray.Add("~/Prototype/Modules/Weather/WeatherControl.ascx"); 
 
                int i = 0; 
                foreach (String widgetURL in _wigetArray) 
                { 
                    NCSBlackRadDock dock = new NCSBlackRadDock(); 
                    dock.widgetIcon.ImageUrl = "~/Prototype/Modules/HttpWebRequest/Images/Config.png"
                    dock.WidgetTitle.Text = string.Format("RadDock{0}", i); 
                    dock.Tag = widgetURL; 
                    dock.ID = string.Format("RadDock{0}", i); 
                    dock.UniqueName = Guid.NewGuid().ToString(); 
                    dock.Text = dock.ID.ToString(); 
                    dock.statusPanel.Visible = false
                    dock.widgetPanel.Visible = false
                    dock.EnableViewState = false
                    dock.Commands.Remove(dock.CloseCommand); 
                    dock.Commands.Remove(dock.ExpandCommand); 
                    dock.Commands.Remove(dock.SettingsCommand); 
 
 
                    dock.DockPositionChanged += new DockPositionChangedEventHandler(RadDock_DockPositionChanged); 
                    dock.AutoPostBack = true
                    dock.Collapsed = true
 
                    WidgetList.Controls.Add(dock); 
                    i++; 
                } 
            } 
        } 

Then finally the RadDock_DockPositionChanged
        protected void RadDock_DockPositionChanged(object sender, DockPositionChangedEventArgs e) 
        { 
             
            Site1 pm = (Site1)Page.Master.Master; 
            NCSBlackRadDock dock = (NCSBlackRadDock)sender; 
 
            if (dock.DockZoneID != e.DockZoneID) 
            { 
                try 
                { 
                    dock.DockZoneID = e.DockZoneID; 
                    dock.Collapsed = false
                    dock.statusPanel.Visible = true
                    dock.widgetPanel.Visible = true
                    DockCloseCommand _CloseCommand = new DockCloseCommand(); 
                    DockExpandCollapseCommand _ExpandCommand = new DockExpandCollapseCommand(); 
                    dock.Commands.Add(_CloseCommand); 
                    dock.Commands.Add(_ExpandCommand); 
                    dock.Commands.Remove(dock.PreviewCommand); 
 
 
                    LoadWidget(dock); 
                    pm.CreateSaveStateTrigger(dock);  //save the dock state every time a dock is moved/altered. 
 
                } 
                catch { } 
            } 
        } 

Pero
Telerik team
 answered on 26 Jan 2010
3 answers
99 views
We've found when we use the image manager to add an image into the content placeholder in the middle of other text, the image is always inserted at the top of the HTML, and you have to drag it down manually to the correct place.  Is this standard behaviour - is there any way to get the images to insert at the cursor position rather than right at the top?
Stanimir
Telerik team
 answered on 26 Jan 2010
1 answer
109 views
Hi,

In FF and IE there is a major difference when double clicking on an image.

Please refer to the attached preview screenshots. I prefer the FF way.

BR,
Marc
Fiko
Telerik team
 answered on 26 Jan 2010
4 answers
178 views
Hi,
I've a little problem with with rad tab. On mouse over every tab change his dimension and appears a little white line on bottom of control. 
I think it's a css problem, but i'm unable to fix it. I've tried  to set .RadTabStrip.rtsLI, .RadTabStrip.rtsLink ect. but with no effects. 
In attachment there's a image with my problem.
Thanks
 
Alessio
Top achievements
Rank 1
 answered on 26 Jan 2010
1 answer
74 views
I want to display next/previous AND FirstPage & LastPage.

I tried adding PagerStyle-Mode="NextPrevAndNumeric"  &  <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>.
However, it only displays next/previous and numbers. Not the FirstPage/LastPage.

How can I get it to display those 2 FirstPage/LastPage icons as well?

thanks
Pavlina
Telerik team
 answered on 26 Jan 2010
11 answers
203 views
Hi all

The page I'm doing is a little complicated but I will try to explain what I need to achieve.
1. On the page there is an UpdatePanel ("upTimeRegs") with a RadGrid, where each row has an ID and a link.
2. When the mouse is over a link, a ToolTip ("ToolTipManager") should appear with contents based on the row's ID.
3. The content of the ToolTip is a user control ("ucTimeRegistrations") with another RadGrid ("RadGridTimeRegistrations") which has it's data bound in the NeedDataSource event handler
4. In the second RadGrid one of the columns is a RadComboBox. For each RadComboBox OnSelectedIndexChanged the main RadGrid should be updated

The problems I have:
1. The ToolTip is loaded fine the first time the mouse is over a link, but then when I hover a second link the content of the tooltip is not changed because the NeedDataSource event is not triggered.

2. The main RadGrid is not being updated when the selected index of a combobox is changed.

Here is some of the code I'm using:
protected void ToolTipManager_OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args) 
    Control ctrl = Page.LoadControl("~/UserControls/ucTimeRegistrations.ascx"); 
    args.UpdatePanel.ContentTemplateContainer.Controls.Add(ctrl); 
    ucTimeRegistrations TimeRegistrations = (ucTimeRegistrations)ctrl; 
    TimeRegistrations.TaskID = Convert.ToInt32(args.Value); 
 
 
 
public partial class ucTimeRegistrations : UserControl 
    public int TaskID; 
    protected void Page_Load(object sender, EventArgs e) 
    { 
    } 
 
    protected void RadGridTimeRegistrations_NeedDataSource(object  source, GridNeedDataSourceEventArgs e) 
    { 
        RadGTimeRegistrations.DataSource = TimeRegistrationHandler.GetTimeRegistrationsFromDB(TaskID); 
    } 
 
    protected void RadComboBoxActivity_SelectedIndexChanged(object sender, RadComboBoxSelectedIndexChangedEventArgs e) 
    { 
        RadComboBox rcbActivity = (RadComboBox)sender; 
        GridDataItem Row = (GridDataItem)rcbActivity.Parent.Parent; 
        if (Row != null
        { 
            int TimeRegistrationID = Convert.ToInt32(Row["TimeRegistrationID"].Text); 
            int ActivityID = Convert.ToInt32(e.Value); 
            TimeRegistrationHandler.UpdateTimeRegistration(TimeRegistrationID, ActivityID); 
                 
            UpdatePanel upTimeRegs = (UpdatePanel) FindControlRecursive(Page, "upTimeRegs");
            upTimeRegs.Update(); 
        } 
    }

    private Control FindControlRecursive(Control rootControl, string Id)
    {
        if (rootControl.ID == Id)
            return rootControl;
        foreach (Control childControl in rootControl.Controls)
        {
            Control foundControl = FindControlRecursive(childControl, Id);
            if (foundControl != null) return foundControl;
        }
        return null;
    }
 


Thanks,
Stefan

Stefan Stanescu
Top achievements
Rank 1
 answered on 26 Jan 2010
2 answers
130 views
Hi!

We are translating the editor (v7.2.0.0 ) to swedish,danish,finnish and norwegian.

Swedish, Danish and Finnish all works fine when setting RadEditor.Language to "se", "da", "fi".

But when I try to set it to "no" for norwegian I get an javascript error
Line: 434
Error: 'localization_no' is undefined

Ive tried to set the language to "nn-NO" and "nb-NO" and also renamed the folder in localization but I still get an error.

Any ideas? I know we are using and old version of the editor but updating it is not possible due to some massive integrations we have done with the editor.

niclas ahlqvist
Top achievements
Rank 1
 answered on 26 Jan 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
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
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?