Get RadDock Tag property on client side

7 posts, 0 answers
  1. salk
    salk avatar
    2 posts
    Member since:
    Nov 2006

    Posted 01 Sep 2009 Link to this post

    how to get TAG property of RadDock on client side?

    thanx
  2. Vyrban
    Vyrban avatar
    31 posts
    Member since:
    Nov 2008

    Posted 03 Sep 2009 Link to this post

    Depends on many things. RadDock is rendering as DIV, but if you want to take its tagName property, try this one in JS:
    var tag = $find("RadDock1").get_element().tagName;

    Of course the RadDock ID must be "RadDock1" ;)
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. salk
    salk avatar
    2 posts
    Member since:
    Nov 2006

    Posted 03 Sep 2009 Link to this post

    let me explain...

    in code behind i have

    RadDock.Tag = "RadDockZone1";

    And then I want on client side get that property...

    I want to be able when I drag RadDock on other zone and when i click X that RadDock dock to first starting dock zone and to do that I need to store some extra value.. the name of starting dock zone. I need to do that because I have 6 dock zones...
  5. Vyrban
    Vyrban avatar
    31 posts
    Member since:
    Nov 2008

    Posted 04 Sep 2009 Link to this post

    ok, so why don't you use hidden fields to save needed information?

    If they can't help you - try to explain more detailed your case, because i don't understand your scenario.
  6. Vyrban
    Vyrban avatar
    31 posts
    Member since:
    Nov 2008

    Posted 18 Sep 2009 Link to this post

    If you have many docks or unknown quantity of them, you can use in JS :
            var tag = "<%= RadDock1.Tag %>"
    for each of them. Hope this helps you.
  7. J
    J avatar
    1 posts
    Member since:
    Jul 2011

    Posted 09 Aug 2011 Link to this post

    Developers want to use Tag property for this because Tag is advertised as being created for developers to store additional data.

    I would like to make use of it as well and I'm trying to find a way to access the tag on clientside to save the ID of my dynamically created RadDockZone which contains my dynamically created dock control ;)

    No luck just yet

  8. Slav
    Admin
    Slav avatar
    1356 posts

    Posted 11 Aug 2011 Link to this post

    Hello,

    Yet another option, in addition to the previously suggested ones, is to use RadDock's Attributes property to set new attribute, storing the additional data.
    RadDock1.Attributes.Add("key", "Saved data");

    You can then access the value of the new attribute on the client-side, as shown in the example below:
    var radDock = $find("<%=RadDock1.ClientID %>"); // the RadDock control is referenced
    var key = radDock.get_element().getAttribute("key"); // the attribute value is accessed

    I have logged the requested feature in the Public Issue Tracking System, you can check it by following this link: Public URL. We will consider implementing it in a future release of the RadControls for ASP.NET AJAX if it gains enough interest.

    Greetings,
    Slav
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top
UI for ASP.NET Ajax is Ready for VS 2017