We can augment the GridView so that instead of a Select button, each row contains a radio button or checkbox. Rather than using a button, two other user interface elements are commonly used for selection: the radio button and checkbox. While the Select button works in many situations, it may not work as well for others.
In the Master/Detail Using a Selectable Master GridView with a Details DetailView tutorial, we saw how to use this feature to display details for the selected GridView row.
When clicked, a postback ensues and the GridView s SelectedIndex property is updated to the index of the row whose Select button was clicked. As examined in the Master/Detail Using a Selectable Master GridView with a Details DetailView, we can add a CommandField to the GridView that includes a Select button. This tutorial and the next one focus on enhancing the row-selection process. In this tutorial and the next two we'll examine how to enhance the GridView s functionality to include additional features. Despite the plethora of provided features, there will often be situations in which additional, non-supported features will need to be added. With a few clicks of the mouse, it s possible to make a GridView where each row can be selected via a button, or to enable editing or deleting capabilities.
It supports templates for further customization. It includes a number of different fields for displaying text, images, hyperlinks, and buttons. The GridView control offers a great deal of built-in functionality. This tutorial looks at how to add a column of radio buttons to a GridView control to provide the user with a more intuitive way of selecting a single row of the GridView.