Questions tagged [listitem]

listitem is an UI element within an ordered or unordered list container.

listitem is an element in the following UI languages:

779 questions
70
votes
11 answers

ListItems attributes in a DropDownList are lost on postback?

A coworker showed me this: He has a DropDownList and a button on a web page. Here's the code behind: protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ListItem item = new ListItem("1"); …
David Hodgson
  • 9,544
  • 17
  • 53
  • 77
57
votes
10 answers

Can I use CSS to add a bullet point to any element?

Pretty simple question, but I am not sure if it is possible. I want to add an image to act as a bullet in all

elements. I know I can achieve this by:

My H1 text here

with css: .bullet{ background:…
Sablefoste
  • 3,680
  • 3
  • 35
  • 52
44
votes
12 answers

Customize list item bullets using CSS

Is it possible to change the size of an
  • element's bullet? Take a look at the code below: li { list-style: square; // I want to change the size of this squared bullet. } I can't seem to find any way to achieve that.
  • Alex
    • 475
    • 1
    • 5
    • 5
    43
    votes
    4 answers

    How to add a list-item at specific position

    I'd like to add a
  • at a specific position, for example:
    • Position 1
    • Position 2
    • Position 4
      • Let's say that I want to add a new
      • below/after
      • Position 2
      • , how can I do it using…
  • Germanico Brismal
    • 431
    • 1
    • 4
    • 3
    36
    votes
    5 answers

    Get listview item position on button click

    This is my listview click event: lv1.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView a, View v, int position, long id) { Object o =…
    coder
    • 14,595
    • 32
    • 107
    • 213
    31
    votes
    5 answers

    Databind ASP.NET List of ListItem to DropDownList issue

    I've just come across this bizarre thing that I was expecting to work in a different (logical) way, but it doesn't. Is it a bug or a "feature"? So there's a DropDownList that I'm populating in the codebehind with a List of ListItem. Each new…
    Farinha
    • 16,296
    • 21
    • 61
    • 79
    30
    votes
    4 answers

    How can I disable a specific LI element inside a UL?

    I have a menu which is a
      . Each menu item is a
    • and currently clickable. Based on some conditions, I want to disable (make it not clickable) a particular
    • element. How can I achieve this? I tried using the disabled attribute on the
    user811433
    • 3,359
    • 11
    • 48
    • 71
    26
    votes
    5 answers

    Set a CSS class on an ASP.NET RadioButtonList ListItem

    Is there any way to set a CSS class on an input item in a radio button list? I'd like to reference these form values by class in jQuery. Given an ASP.NET RadioButtonList with classes set on the ListItems:
    y0mbo
    • 4,492
    • 6
    • 37
    • 45
    16
    votes
    2 answers

    Centering floating list items
  • inside a div or their
  • HTML:
    • .....
    I'm coding a simple gallery page by creating unordered list and each list…
    Sam
    • 325
    • 2
    • 3
    • 9
    16
    votes
    2 answers

    Android: Default layout for listitem containing title and subtitle

    I have made a listitem, containing a title and a subtitle. Looking to the result, I think it doesn't look really professional. So that's why I'm asking. The listitem I'm looking for is pretty common (it's used in a lot of apps i.e. Android's default…
    Xander
    • 5,007
    • 14
    • 46
    • 76
    14
    votes
    6 answers

    SharePoint 2010 - Client Object Model - Add attachment to ListItem

    I have a SharePoint List to which I'm adding new ListItems using the Client Object Model. Adding ListItems is not a problem and works great. Now I want to add attachments. I'm using the SaveBinaryDirect in the following…
    Thorben
    • 143
    • 1
    • 1
    • 6
    12
    votes
    2 answers

    Creating a ListView with custom list items programmatically in Android - no xml list item layout

    As I have seen on previously asked questions, inside the custom adapter class (say, MyAdapter extends ArrayAdapter) they always use an inflated xml list-item layout. What I am hoping to do is create everything entirely using Java and no XML... //…
    daryl
    • 231
    • 1
    • 3
    • 13
    12
    votes
    4 answers

    programmatically add css class to ListItem

    I need to produce with asp.net controls this structure, but ListItem doesn't allow add properties and classes. What is the best way to do it?
    • SomeText
    • SomeText2
    rudnev
    • 2,201
    • 3
    • 21
    • 31
    10
    votes
    4 answers

    Adding ListItems to a DropDownList from a generic list

    I have a this aspx-code: (sample) With this codebehind: List colors = new List(); colors.Add(new…
    Espo
    • 39,502
    • 20
    • 127
    • 156
    9
    votes
    2 answers

    removing RecyclerView items

    I have a RecyclerView which is adding items each certain period. When adding objects, if list items are more than (lets say) 500, then the first items will be removed and the new items will be added. If the RecyclerView cannot scroll down any more…
    BamsBamx
    • 3,333
    • 3
    • 31
    • 57
    1
    2 3
    51 52