In Windows Form applications the tooltip functionality is not built into the controls as in HTML objects.
To add tooltip to your controls on Windows Forms
- Open the Windows Form in the designer
- Drag the ToolTip control from the Common Controls section of the Toolbox to the form. The ToolTip control will be placed at the bottom margin of the design surface outside of the visible area of the form.
- A new item appears in the Misc section of the property list of the form controls (buttons, textboxes, etc): ToolTip on toolTip1
- Enter the text there you want the users to see when they hover above the control.
To display data in a DataGridView on a Windows Form
- Add a new form to the Win Form Application project
- Drag a BindingSource from the Toolbox to the form
- The bindingSource object appears below the form
- Rename the Binding Source
- Select the bindingSource1 object below the form
- Press F4 to display the Properties
- Change the Name property to reflect the purpose of the object
- Select the DataSource item in the Data section and click the Add Project Data Source… link
The name is misleading. At this step we are not selecting the source of the data, we are selecting the object that describes the data row. The DataGridView will generate the columns based on the object we will select here.
- To load the data from a class select Object as the Data Source Type and click Next
- Select the object that describes the data row you want to display
- Drag a DataGridView from the Toolbox to the form
- Select the small arrow at the upper right corner of the DataGridView to open the Tasks dialog
- Click the down arrow next tot the Choose Data Source list
- Select the Binding Data Source that you added to the form
- Click the Edit Columns link to set the visibility of the columns
- To hide a column set the Visible attribute in the Appearance section to False