Client Events

2 posts, 0 answers
  1. Ryan Means
    Ryan Means avatar
    32 posts
    Member since:
    Dec 2006

    Posted 31 Oct 2008 Link to this post

    I have two questions regarding the client side API of the RadColorPicker.

    1.  How am I supposed to know what is avaliable in the eventArgs of the OnClientColorChanged client side event handler?  The documentation sample references the use of eventArgs.get_oldColor() but the documentation of the client object does not talk about the "get_oldColor()".

    2.  How can I add items to the client side event args?  What I would like to add is the client id of a textbox that should be updated when the selected color is changed.  More specifically I would like to set the client id of the textbox to update from the server (c# code) so I can reference the passed in eventArgs to get the id of the textbox to update.
  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 05 Nov 2008 Link to this post

    Hi Ryan Means,
    I just answered your support ticket with the same question. I will give the information here as well, so that it is available to all:

    1. The get_oldColor method is a method of the arguments, that the event handler receives as second parameter. As mentioned in the documentation - this handler receives 2 parameters:
      1. The color picker instance that fired the event - this is a color picker client object which has all the methods and properties, described in the topic.
      2. Event arguments - these have the get_oldColor method.
    2. You cannot add items to the event arguments that the event handler receives. Those are created by the color picker control itself and you have no control over the code that instantiates them. You will need to find another way to pass the ClientID to the event handler - e.g. use a convention for the IDs of the control (RacColorPicker1 updates Textbox1, RadColorPicker2 updates Textbox2).


    Sincerely yours,


    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft R3 2016 release webinar banner
Back to Top