Welcome to the FoxLearn
Today we will learn how to export data in listview control to text file
First, We will design a simple UI that allows you to bind the product data to a listview control, then export data from listview control to text file
A text file is a kind of computer file that is structured as a sequence of lines of electronic text
A text file exists within a computer file system
The end of a text file is often denoted by placing one or more special characters, known as an end-of-file marker, after the last line in a text file
A ListView control allows you to display a list of items with item text and, optionally, an icon to identify the type of item
We will use entity framework to retrieve data from the product table in the northwind database
Entity Framework is an object-relational mapper that enables .NET developers to work with relational data using domain-specific objects
It eliminates the need for most of the data-access code that developers usually need to write
You can download the northwind database below this video
The ListViewItem class represents an item within a ListView control
The items that are displayed in the list can be shown in one of five different views
Items can be displayed as large icons, as small icons, or as small icons in a vertical list
Items can also have subitems which contain information that is related to the parent item
The details view allows you to display the item and its subitems in a grid with column headers that identify the information being displayed in a subitem
The tile view, which has limited availability as described below, allows you to display the item and its subitems as a tile that contains a large icon next to the textual information
Thank you for watching this video