Beispiel #1
0
        /// <summary>
        /// Generates a list of all files associated with this application
        /// </summary>
        private void DataBindFiles()
        {
            List <File> fileList = new List <File>(currentApplication.Files);

            gviewFiles.DataSource = FileBLL.Sort(fileList, SortDirection.Ascending);
            gviewFiles.DataBind();
        }
Beispiel #2
0
        private void dataGridView1_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            List <MyFileInfo> sortList = new List <MyFileInfo>();

            sortList = (List <MyFileInfo>)dataGridView1.DataSource;
            string dataclick = dataGridView1.Columns[e.ColumnIndex].DataPropertyName;

            if (flag = true && dataclick == dataClicked)
            {
                sortList.Reverse();
            }
            else
            {
                sortList = FileBLL.Sort(list, dataclick);
            }
            dataGridView1.DataSource = sortList;
            dataGridView1.Refresh();
            flag        = true;
            dataClicked = dataclick;
        }