This is a migrated thread and some comments may be shown as answers.

Problem in setting number of items to show and height

1 Answer 70 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Felice
Top achievements
Rank 1
Felice asked on 14 Apr 2014, 04:34 PM
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

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 16 Apr 2014, 05:04 AM
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.
Tags
DropDownList
Asked by
Felice
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or