Problem in setting number of items to show and height

2 posts, 0 answers
  1. Felice
    Felice avatar
    198 posts
    Member since:
    Aug 2013

    Posted 14 Apr 2014 Link to this post

    Hi,
    I have these two dropdownlists in a Edit Form Template where I tried to set the number of items to show and/or the height but is not producing any effect. please look at the pictures attached.

    <EditFormSettings EditFormType="Template">
       <FormTemplate>
          <table class="table">
     
        <telerik:RadDropDownList ID="RadDropDownList2" ItemCountPerRequest="4"
         DefaultMessage="Please select a value" runat="server" DataSourceID="SqlDataSource3"
         DataTextField="minutes" DataValueField="minutes" SelectedValue='<%#Bind("minutes") %>' Skin="Outlook">
            </telerik:RadDropDownList>
     
        <telerik:RadDropDownList ID="RadDropDownList3" runat="server" ItemCountPerRequest="12"
         DataSourceID="SqlDataSource4" DataTextField="hours" DefaultMessage="Please select a value"
         DataValueField="hours" SelectedValue='<%#Bind("hours") %>' Skin="Outlook">
            </telerik:RadDropDownList>
     
          </table>
       </FormTemplate>
    </EditFormSettings>
    What I would like to achieve is the following:
    For the dropdownlist "Minutes" shows only the 4 items
    For the dropdownlist "hours" show the first 12" values and then the others only on demand.
    How can I fix these dropdownlists to achieve the above scenario?
    Thanks for the support,
    Felice
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Apr 2014 in reply to Felice Link to this post

    Hi Felice,

    As a work around you can set the DropDownHeight of the RadDropDownList to achieve your scenario.

    ASPX:
    ...
    <telerik:RadDropDownList ID="RadDropDownList2" ItemCountPerRequest="4" DefaultMessage="Please select a value" DropDownHeight="100px" runat="server" DataSourceID="SqlDataSource3" DataTextField="minutes" DataValueField="minutes" SelectedValue='<%#Bind("minutes") %>' Skin="Outlook">
    </telerik:RadDropDownList>
    <telerik:RadDropDownList ID="RadDropDownList3" runat="server" ItemCountPerRequest="12" DropDownHeight="250px" DataSourceID="SqlDataSource4" DataTextField="hours" DefaultMessage="Please select a value" DataValueField="hours" SelectedValue='<%#Bind("hours") %>' Skin="Outlook">
    </telerik:RadDropDownList>
    ...

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top