The following code is implemented in .NET environment:
For example you have a datalist and you want to display a number of items at first sight, so that user can scroll down to see more items.
In the designer part you should do the following:

Then, in the code (it can be page_load event) you write the following code:
You should change 200px to whatever is appropriate for your implementation.
if (dl.Items.Count > someNumber)
{
datalist.Style.Add("height", "200px");
datalist.Style.Add("overflow", "auto");
}
If the datalist has more than "someNumber" items, then the following is observed:

Hiç yorum yok:
Yorum Gönder