예제 #1
0
        public static void populateDataGridView(DataGridView datagridview, object data)
        {
            DataGridViewColumn sortColumn    = datagridview.SortedColumn;
            SortOrder          sortDirection = datagridview.SortOrder;

            datagridview.DataSource = data;

            if (sortDirection != SortOrder.None)
            {
                datagridview.Sort(sortColumn, Tools.getListSortDirection(sortDirection));
            }
        }