Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
5 views

Is there a way to capture an event after a Dock has been dragged or dropped (either to a new position in an existing DockZone, or to a different DockZone)? 

The use case i've developed is a query / expression builder where each dock is a custom user control representing a single condition in a query.  Drag and drop is enabled in the DockZone so that docks can be re-arranged as necessary.  This all works great and i'm able to create docks at runtime and populate each dock with the correct expression data from a database.  However there are certain display items in the dock's user control that i would like to be able to manipulate based on the dock's position in the DockZone.  For example, if you were building a query with two expressions you need to be able to join those two expressions together using either AND, or OR.  If there is only a single expression in your query then selecting AND or OR isn't necessary because there is nothing to combine.  So in my solution  when the first dock in a zone is configured it doesn't ask for or show any AND/OR options because it's not applicable.  It's only applicable for docks in the 2nd, 3rd, 4th+ positions. This all works great until you have re-order the conditions.  When the conditions are re-ordered if the first condition is swapped into the second position, then ideally i'd like to be able to capture some event or tie into some command so that i can re-draw the docks so that i can show/hide this logic operator selector (and/or).   

Currently it looks like this before you drag and drop: You can see the AND/OR value is not displayed next to the first condition (dock). 

  After dragging to just swap the position of these two docks it looks like this:

If the user were to save this state to the database, it would re-draw everything correctly, for the most part:

The AND/OR  selector is dropped from the first expression and it is visible next to the second condition even though it says AND instead of previously being OR.  The user can correct for this AND/OR in the second condition if they can see that it needs to be switched.  If they don't see anything (as in screenshot 2) then they don't know that anything needs to be adjusted. 

Ideally i'd like to be able to get the user to this third screenshot without the user having to click a save button after each drag and drop operation.  I tried to use the PositionChanged event but the dock state that is present in this event handler is the pre-move state, not the post-move state.  Ideally i'd want to re-draw all the docks because like in this example dragging one dock to a different position should change the display in two docks.  In a more complicated scenario a dock could even be dragged to a separate DockZone (which is not covered in this example), so to be safe i'd like to be able to redraw / create all the docks across all the zones whenever any individual dock is dragged and dropped.  

Is this possible?  Thanks for your suggestions!

-Mark

Mark
Top achievements
Rank 1
Iron
Iron
 asked on 27 May 2025
3 answers
69 views

Checking the current demos I noticed you are still using the WebComponentsIcons font for the icons like in RadDock. Where can I find a list of the Icons inside that font along with the codes used for each icon? KendoUI icon fonts listed here (List of Icons in the Telerik and Kendo UI Web Components Icons System | Design System Kit) don't match.

 

Thank you

Rumen
Telerik team
 answered on 04 Feb 2025
0 answers
98 views

Hi

How do you add a client side OnExpanded / OnClientExpanded?

 

I have tried... but I get an error add_expand is NOT A FUNCTION 

 

var radDock = $find('MyRadDock')

 

radDock.add_expand(function () {

    // Expand

}

Ideas?  thx

Jonathan
Top achievements
Rank 1
Iron
Veteran
 asked on 06 Jul 2023
1 answer
91 views

I allow the user to create in runtime, zones (my sections) and docks.

<asp:Repeater ID="repSections" runat="server" OnItemDataBound="repSections_ItemDataBound">
        <ItemTemplate>
            <asp:Panel ID="panelSection" runat="server" CssClass="container">
		
			A RadDockZone(section) and it's RadDocks are injected here in runtime...

		</asp:Panel>
        </ItemTemplate>        
    </asp:Repeater>

This repeater is populated from database and zones and it's docks injected in runtime, assigning the DockPositionChanged event to each of the created docks. Since I also inject in runtime, controls before and after each zone to manage it (Add, configure, move up/down) and I want them to postback using ajax, I'm configuring the ajax behavior in the ItemDataBound event of the Repeater:

protected void repSections_ItemDataBound(object sender, RepeaterItemEventArgs e)

{

LinkButton linkbtAddNormalSection = e.Item.FindControl("linkbtAddNormalSection") as LinkButton;
linkbtAddNormalSection.CommandArgument = section.Id.ToString();
AjaxSetting ajaxSetting_linkbtAddNormalSection = new AjaxSetting();
ajaxSetting_linkbtAddNormalSection.AjaxControlID = linkbtAddNormalSection.UniqueID;
ajaxSetting_linkbtAddNormalSection.EventName = "Click";
ajaxSetting_linkbtAddNormalSection.UpdatedControls.AddRange(new AjaxUpdatedControlsCollection()
{
 new AjaxUpdatedControl(repSections.UniqueID,""),
                            new AjaxUpdatedControl(panelNosections.UniqueID,""),
                            new AjaxUpdatedControl(radNotification.UniqueID, "")
});
ajaxManagerProxy.AjaxSettings.Add(ajaxSetting_linkbtAddNormalSection);

...

}

Because of this, RadAjax places a RadAjaxPanel that includes all the created zones inside of the repeater causing the DockPositionChanged event to function in ajax mode. That's fine, and works great since avoids a regular postback each time a dock changes position. 

The issue is that I need to show a RadNotification that is outside the repeater and consequently, outside that RadAjaxPanel and I can't show it from the  DockPositionChanged event. 

Any suggestion to overcome this?

 

Thank you!

Hugo Augusto
Top achievements
Rank 2
Iron
Veteran
Iron
 answered on 13 Jan 2023
0 answers
172 views

Hi,

Is there any way to get the mouse x,y of the dock as it's being dragged?   I have javascript examples that use dataTransfer, and have tried adapting them to dock events, OnClientDragStarted, OnClientDrag and OnClientDragEnd.   But OnClientDragStarted, which does provide access to the "OriginalEvent", does not have dataTransfer defined. And OnClientDrag provides no access to the "OriginalEvent".

Can you provide some direction?  Or is just not possible.

Dave

 

 

Dave
Top achievements
Rank 1
Iron
Veteran
Iron
 asked on 29 Jun 2021
1 answer
106 views

I need to show the handle / title bar under certain conditions, and have not showing under other conditions.  Looking for a way to set the DockHandle to none using javascript.

Is there a way to do this?   I tried dock.set_handle(null), and that didn't work.

Thanks,

Dave

 

Vessy
Telerik team
 answered on 18 Jun 2021
3 answers
110 views

I have a product in asp.net web forms which has 6000+ plus clients with differant databases.

I stored raddock state of user controls in database. now i want to convert my application to mvc. so now how could i load this state in mvc . user controls treated as partial view

Vessy
Telerik team
 answered on 12 Apr 2021
10 answers
404 views
Hoping someone's got the answer to this.  It should be a one liner,but havent figured out how to do it or anywhere where it explains.

I'm creating raddock's programatically, having stored their states in the database.  When i load them, the ContentTemplate is also set in code and is a User Control (ascx).

I've set 

EnableEmbeddedSkins

="false"

I thought that might help me ovverride, but still missing the mark.

all I want is the horz and vert scrollbars to go away.  Doesnt seem to matter if my zone is wider or smaller.  with the same ascx it still always shows the scrollbars.

thanks!

n/a
Top achievements
Rank 1
Veteran
 answered on 22 Dec 2020
5 answers
112 views
Hi

I'm using two dock zones in a page and I have some controls in one of them, I'm trying to drag these controls into the other dock zone and have it in both zones, In common words I need to copy (or something like that) the control by dragging it on the other zone,

Any ideas how to do that?

Thanks
Vessy
Telerik team
 answered on 25 Mar 2020
7 answers
65 views
My company has 5 separate applications all having some type of dashboard.  We are looking to build an overall workbench application that would allow the applications to be loosely coupled.  Our goal is to remove core items like navigation from each sub-application and have the overall workbench application manage navigation loading each screen from sub-applications via iframes.  This allows us to keep each system loosely coupled and in the end easier to maintain diverse code bases. 

Here-in is the issue.  If each application has a set of dockable controls, how can they be docked on the overall workbench application?  Obviously we can convert each sub-application control to an ASPX and for the overall workbench dashboard, basically have one control type that loads an IFrame within its control.  From what I have seen in the support forum, this is perhaps a less than desirable solution.  If I don't go this route, is there a way I can share controls across applications without having to package every single application up as a solution.  This would be somewhat problematic since some of our customers have 2 of the apps, others 5 and so on. Worse yet is each of the 5 applications are on different release schedules which could be an extreme coordination problem.

It is for this reason alone, that we have not committed to the Telerik solutions and would greatly appreciate any design suggestions for this situation.

Thanks,
Shane

Rumen
Telerik team
 answered on 03 Jun 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?