First, drag a GridView control and SqlDataSource control to configure the data source. Then, configure the GridView control, click 'Edit Template' to add 2 CheckBox controls, place them inside the ItemTemplate and HeaderTemplate respectively, and end editing. Next, add the OnCheckedChanged event in the CheckBox of the source code interface.