How to RadControls at ClientSide in OnRowDataBound event?

4 posts, 1 answers
  1. Somnath
    Somnath avatar
    43 posts
    Member since:
    Jun 2012

    Posted 16 Jul 2012 Link to this post

    Hi ,

    I am having RadGrid for which I am binding data on clientside in pageLoad() using pageMethods .
    In OnRowDataBound() I am able to get particular column using 

    args.get_item().get_cell('UniqueColumnName')

    Now my requirement is I want to add RadControl ClientSide

    Please suggest for the same.

    Thanks & Regards,
    Somnath 


  2. Answer
    Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Jul 2012 Link to this post

    Hello,

    As far as I know these controls cannot be created from Clientside. Check the following forum thread which discusses the similar scenario.
    Create Radcontrols in Client side

    Thanks,
    Shinu.
  3. Somnath
    Somnath avatar
    43 posts
    Member since:
    Jun 2012

    Posted 18 Jul 2012 Link to this post

    Hi,

    Thanks for the quick reply.

    Is it possible to create new control by getting the Client Object refrence of already rendered combobox control ?

    I tried by following way.
     var vrDimension= $telerik.findControl(insertItem, "ddlDimension");
     RowItem.get_cell('ConstraintName').innerHTML = vrDimension.get_element().cloneNode(true).outerHTML;

    Control is getting added this way ,but dropdown is not getting opened with its items.

    Please suggest for the same.

    Thanks & Regards,
    Somnath 
  4. Antonio Stoilkov
    Admin
    Antonio Stoilkov avatar
    530 posts

    Posted 23 Jul 2012 Link to this post

    Hello Somnath,

    The desired functionality could be implemented but additional postback is required to dynamically create a RadComboBox control. Another possible solution is to create RadComboBox with Display set to None and then client-side just show the control. Note that cloning a RadComboBox HTML content to create another instance of it is not supported because there is client-side object associated with each control which depends on properties sends from the server which prevents the creation of them purely on the client.

    Regards,
    Antonio Stoilkov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top