18-C # Listview Usage Example 1 (Column and Item Addition), C # Form Courses
SendeKodYaz SendeKodYaz
41.9K subscribers
30,068 views
527

 Published On Dec 25, 2017

Example of C # Listview In 1 named training, adding Listview, usage and properties, listview column adding, adding record are explained.

What is C # ListView?
A line-by-line TextView is a structure that allows the name to be stored in its own list of entries. Although it is similar in structure to the ListBox object, it is much more useful. Columns, ie column names and widths are easily adjusted and records can be viewed regularly.

C # ListView Column Insert
To add a column to the ListView object, you can use the properties in the Properties panel or the properties that appear when you click the play icon at the top of the object. However, the following method is used for those who want to do this with code.

            listView1.Columns.Add ("TC ID NO", 150);
            listView1.Columns.Add ("ADI SURNAME", 200);
            listView1.Columns.Add ("AGE", 50);
            listView1.Columns.Add ("GRANTS", 150);
            listView1.Columns.Add ("GENDER", 125);
            listView1.Columns.Add ("PLACE OF BIRTH", 125);
            listView1.Columns.Add ("TELEPHONE NO", 130);

Finding Number of C # ListView Records
The Items.Count () method is used to find the number of records in the ListView object. This value can be stored in an int variable and used as desired.
  
int record = listView1.Items.Count;
label8.Text = Convert.ToString (commentary);

~
Web Site ► http://www.sendekodyaz.com
~
Not to miss new videos ► http://bit.ly/sendekodyazyoutube
For C # Forms training ► http://bit.ly/csharpformdersleri
Training for C # Console Lessons ► http://bit.ly/csharpconsoledersleri
~
Facebook ►   / sendekodyaz  
Google+ ► http://plus.google.com/+SendKodYaz
Twitter ►   / sende_kodyaz  
Tumblr ►   / sendekodyaz  
Blogger ► http://onlineprogramlamadersleri.blog...

show more

Share/Embed