Do I need to create a new SQL table just to populate a drop down

4 posts, 0 answers
  1. Dave
    Dave avatar
    11 posts
    Member since:
    Dec 2011

    Posted 05 Jul 2012 Link to this post

    I am very new at this so, sorry if this is very basic.

    I got a rad grid for all my employees and am trying to have a Race, Sex and Classification drop down box to populate the data.

    Is there a way to do that right in the editor?

    Do I just replace my bound fields with the dropdownboxes and enter the list of available choices somewhere? 

    I can not seem to find a way to do this?

  2. Jayesh Goyani
    Jayesh Goyani avatar
    2733 posts
    Member since:
    May 2010

    Posted 05 Jul 2012 Link to this post


    Please check below links.
    ComboBox / Multi-column ComboBox
    ComboBox / Custom Attributes
    Jayesh Goyani
  3. Dave
    Dave avatar
    11 posts
    Member since:
    Dec 2011

    Posted 05 Jul 2012 Link to this post

    I got this piece from that, but I need something very basic.......

    My datafield is emp_Sex and I need a drop down for Male and Female

    Then I got another one for Race and another one for Classification

    Teh code below looks way to confusing.

    <telerik:RadComboBox ID="RadComboBox_AvatarSelection" 
                         <!-- ImageClassName, Popularity and Artist are custom attributues of the items. 
                         You can add as many as you wish. -->
                            <div class="<%# DataBinder.Eval(Container, "Attributes['ImageClassName']") %>">
                                <span class="qsfexAvatarContainer"></span>
                                <span class="qsfexField">Popularity: <%# DataBinder.Eval(Container, "Attributes['Popularity']")%></span>
                                <span class="qsfexField">Artist: <%# DataBinder.Eval(Container, "Attributes['Artist']")%></span>
                                Artist="Jone Larragne"
                                Artist="Jone Larragne"
                                Artist="Jone Larragne"
                                Artist="Jone Larragne"

  4. Eyup
    Eyup avatar
    3323 posts

    Posted 10 Jul 2012 Link to this post

    Hello Matt,

    Could you please elaborate some more on the issue? Where exactly do you want to place the requested comboboxes:
     - in the edit form
     - or in the filtering item

    Of course you could fill the combobox with your custom items without declaring additional SQL:
     - Design time:
    <telerik:RadComboBox ID="RadComboBox1" runat="server">
              <telerik:RadComboBoxItem Text="Male" Value="m" />
              <telerik:RadComboBoxItem Text="Female" Value="f" />
     - Code-behind:
    RadComboBox RadComboBox1= new RadComboBox();
    [] sexOptions = { "Male", "Female" };
    RadComboBox1.DataSource = sexOptions;
      - Or:
    RadComboBox comboBox = new RadComboBox();
    RadComboBoxItem mItem = new RadComboBoxItem("Male", "m");
    RadComboBoxItem fItem = new RadComboBoxItem("Female", "f");

    If this is not you are looking for, please provide us additional detail as well as some screenshots of the desired behavior. Thus, we will be able to figure out what exactly you have in mind and suggest a proper approach.

    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