From 30ace3eea2ba24a8582df81bd8496d616d7b6279 Mon Sep 17 00:00:00 2001 From: Igor Goldobin Date: Sat, 23 Mar 2024 12:01:59 +1000 Subject: [PATCH 1/2] =?UTF-8?q?Create=20Rule=20=E2=80=9Calways-use-gridvie?= =?UTF-8?q?w-instead-of-listbox/rule=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rule.md | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 rules/always-use-gridview-instead-of-listbox/rule.md diff --git a/rules/always-use-gridview-instead-of-listbox/rule.md b/rules/always-use-gridview-instead-of-listbox/rule.md new file mode 100644 index 00000000000..4b0b5c03d73 --- /dev/null +++ b/rules/always-use-gridview-instead-of-listbox/rule.md @@ -0,0 +1,24 @@ +--- +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: + +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) +::: From 73b33f171e0a8444e73fbc31e5da619df5ab7a1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tiago=20Ara=C3=BAjo=20=5BSSW=5D?= Date: Mon, 25 Mar 2024 17:53:16 -0300 Subject: [PATCH 2/2] Update rule.md --- .../always-use-gridview-instead-of-listbox/rule.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/rules/always-use-gridview-instead-of-listbox/rule.md b/rules/always-use-gridview-instead-of-listbox/rule.md index 4b0b5c03d73..820eef3b3a5 100644 --- a/rules/always-use-gridview-instead-of-listbox/rule.md +++ b/rules/always-use-gridview-instead-of-listbox/rule.md @@ -10,15 +10,16 @@ guid: 62fdd9ea-cbec-4e93-8547-1da7c2ec13fa --- 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. - + +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) +![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) +![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) :::