Do you always use GridView instead of ListBox?

Last updated by Brady Stroud [SSW] about 1 month ago.See history

Always choose a GridView (over a ListBox) because it can have:

  1. Multiple columns
  2. Checkboxes in the header of the control, which enables users to easily check or uncheck all items
  3. Add sub-controls added such as buttons, links, charts, and even customized controls to the Gridview. This means you get unlimited flexibility with the GridView

Figure: Bad example - No header rows and no checkbox to check or uncheck all items. None of this can be done with the ListView

Figure: Good example - A header row and a checkbox to control all items, and multiple columns give users a richer experience. This can all be done using a GridView

Adam Cogan
We open source. Powered by GitHub