A FastDataListView virtualizes the display of data from a DataSource. It operates on DataSets and DataTables in the same way as a DataListView, but does so much more efficiently.

A FastDataListView still has to load all its data from the DataSource. If you have SQL statement that returns 1 million rows, all 1 million rows will still need to read from the database. However, once the rows are loaded, the FastDataListView will only build rows as they are displayed.

Наследование: FastObjectListView
Пример #1
0
        /**************************************************************************************************/
        void ListViewDataSetSelectedIndexChanged(object sender, System.EventArgs e)
        {
            BrightIdeasSoftware.FastDataListView listView = (FastDataListView)sender;
            DataRowView row = (DataRowView)listView.SelectedObject;

            if (row == null)
            {
                this.DisableControls();
                this.label1.Text = String.Format("{0} patients", listView.Items.Count);
            }
            else
            {
                this.EnableControls();

                string unitnum = row["unitnum"].ToString();
                string msg     = "'" + row["patientname"] + "'";
                this.label1.Text = String.Format("Selected {0} from {1} patients", msg, listView.Items.Count);
                if (string.IsNullOrEmpty(unitnum) == false)
                {
                    if (SessionManager.Instance.GetActivePatient() == null)
                    {
                        ActivateSelection(unitnum);
                    }
                    else
                    {
                        if (unitnum != SessionManager.Instance.GetActivePatient().unitnum)
                        {
                            SessionManager.Instance.GetActivePatient().ReleaseListeners(this);
                            ActivateSelection(unitnum);
                        }
                    }
                }
            }
        }