Implementing Windows Program Data updates

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.