Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrating Rule “always-use-gridview-instead-of-listbox/rule” #8238

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions rules/always-use-gridview-instead-of-listbox/rule.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
type: rule
title: Do you always use GridView instead of ListBox?
uri: always-use-gridview-instead-of-listbox
authors:
- title: Adam Cogan
url: https://ssw.com.au/people/adam-cogan/
created: 2014-03-14T02:01:00.000Z
guid: 62fdd9ea-cbec-4e93-8547-1da7c2ec13fa
---
Always choose a GridView (over a ListBox) because it can have:

<!--endintro-->

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

::: bad
![Figure: Bad example - No header rows and no checkbox to check or uncheck all items. None of this can be done with the ListView](datagridviewbad.png)
:::

::: good
![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](datagridviewgood.png)
:::
Loading