Quantcast
Channel: Celik » Tips
Browsing latest articles
Browse All 5 View Live

How to add columns in listview

This c# code creates columns with columnheader for the items and subitems in a listview. There are different ways to create columns. ColumnHeader column1 = new ColumnHeader(); column1.Width = 100;...

View Article



How to add rows, items and subitems in a listview

This c# code shows you, how to add a row in a listview: ListViewItem row = new ListViewItem(); row.SubItems.Add(value.ToString()); listview1.Items.Add(row); This creates 3 items and 3 subitems in a...

View Article

How you can initialize ListView

// Set the view to show details. listView1.View = View.Details; // Allow the user to edit item text. listView1.LabelEdit = true; // Allow the user to rearrange columns. listView1.AllowColumnReorder =...

View Article

How to clear the items in ListView

// Clear the ListView control listView1.Items.Clear();

View Article

Image may be NSFW.
Clik here to view.

How to coloring every second row in ListView

This c# code shows you how you coloring every second row in a ListView: int i = 0; foreach (ListViewItem item in listView1.Items) { if (i++ % 2 == 1) { item.BackColor = Color.LightGray; item.ForeColor...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images