More in this section
Forums / Developing with Sitefinity / adding text box in radlistbox

adding text box in radlistbox

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
2 posts, 0 answered
  1. nelson
    nelson avatar
    4 posts
    Registered:
    02 Jun 2010
    23 Jun 2010
    Link to this post
    Hi,
          I am adding the options in a 'radlistbox' from client side on clientclick event of the button.
          Now, as client requirement i need to add a checkbox infront of every option which i am adding from client side.
          Can you please tell me the solution for this.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    24 Jun 2010
    Link to this post
    Hi nelson,

    There is a property CheckBoxes that you could set to true. This will add checkboxes each time you click the button and create a new RadListBoxItem

    <telerik:RadScriptBlock runat="server" ID="block">
    <script  type="text/javascript">
     
     
    function AddNewItem()
    {  
      var listbox = $find("<%= RadListBox2.ClientID %>");
      var item = new Telerik.Web.UI.RadListBoxItem();
      item.set_text("item");
      listbox.trackChanges();
      listbox.get_items().add(item);
      item.select();
      listbox.commitChanges();       
     
    }
     
    </script>
    </telerik:RadScriptBlock>
     
     
     <telerik:RadListBox ID="RadListBox2" runat="server" Height="230px"  CheckBoxes="true"  Skin="Vista"/>
      <telerik:RadTextBox runat="server" ID="RadTextBox1" Text="NewItem" />
     <asp:Button  ID="Button3" OnClientClick="return AddNewItem()" Text="NewItem" runat="server" />


    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
2 posts, 0 answered