0% found this document useful (0 votes)
30 views1 page

View List

The document contains code for initializing and populating list views from different data sources. It includes: 1) A method to initialize a list view and add columns for process and user. 2) A method to populate a form with parameter names, types, and indicators from a metadata object. 3) A method to create a list view from a data row array, adding columns from the data table. 4) A method to create a search results form, adding a label, list control and setting properties. 5) A method to clear and populate a list view with items from a list, adding each as a list view item.

Uploaded by

Niko Pro
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

View List

The document contains code for initializing and populating list views from different data sources. It includes: 1) A method to initialize a list view and add columns for process and user. 2) A method to populate a form with parameter names, types, and indicators from a metadata object. 3) A method to create a list view from a data row array, adding columns from the data table. 4) A method to create a search results form, adding a label, list control and setting properties. 5) A method to clear and populate a list view with items from a list, adding each as a list view item.

Uploaded by

Niko Pro
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

private void InitListView() { listViewProcesses.Clear(); listViewProcesses.Columns.Add("Process",150,System.Windows.Forms.HorizontalAlignment.Left); listViewProcesses.Columns.Add("User",150, System.Windows.Forms.HorizontalAlignment.

Left); } void btnParams_click() { List<string[]> list = new List<string[]>(); foreach (PropertyData p in md.InParameters.Properties) list.Add(new string[] { p.Name, p.Type.ToString(), null }); foreach (PropertyData p in md.OutParameters.Properties) list.Add(new string[] { p.Name, p.Type.ToString(), "true" }); if (list.Count == 0) }

public FormValues(List<string[]> list) { lblValues.Text = name + " (" + list.Count + " items)"; foreach (string[] s in list) listValues.Items.Add(new ListViewItem(s)); }

Control CreateList(DataRow[] rows) { ListView list = new ListView(); DataColumnCollection cols = rows[0].Table.Columns; list.Columns.Add(cols[0].ColumnName, 30); list.Columns.Add(cols[1].ColumnName, 100); foreach (DataRow row in rows) list.Items.Add(new ListViewItem(new string[] { row[0].ToString(), row[1].ToString()})); list.SelectedIndexChanged += new EventHandler(listFound_SelectedIndexChanged); return list; } void CreateFormFound(Control control, string text) { // . msg " - - " Label msg = new Label(); msg.Text = filter; formFound = new Form(); formFound.Controls.Add(msg); formFound.Text = "Search results"; formFound.Controls.Add(control); } void FillListView(List<PersonDTO> lPerson) { listView.Items.Clear(); foreach (PersonDTO item in lPerson) { listView.Items.Add(new ListViewItem(item.ToString())); } }

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy