Select a node to get query criteria
Properties and Events
Property name Description
Selecednode The selected node
Level node depth starts at 0
Event name Description
Occurs when the AfterSelect node is selected
Through the TreeView control is a node that represents data, important properties and events
Nodes Property
SelectedNode Property
AfterSelect Events
Show data that matches the criteria of the selected node
The first method: (recommended) The second method of
Combine query criteria to filter directly in existing data
Re-querying data * No need to re-retrieve data
Re-populate the data set
Working with Data Views DataView
Create a Data View object
Located in the System.Data namespace (* default import on form)
DataView Object name =new DataView (data table);
You can also use the parameterless constructor to create a dataviw, but you must set the Table property before using it
Using the RowFilter property
Criteria for filtering
Similar to where in a query statement
Use the Sort property
Sorting criteria
Similar to the later part of the query statement
To reduce the steps of instantiating a DataView object, you can also use the DefaultView property of the DataTable to get DataView
Get the selected student number
dgvstudengt.selectedrows[0].calls["Studengno"].value
Primary foreign key relationship between student and score tables
Delete results First
Then delete the students
Entire row selected DataGridView entire row selected
(The SelectionMode property is set to Fullrowselect
Get the selected study number
Making type conversions
)
To re-fill the dataset after a successful deletion
Implementing Windows Program Data updates