Exemple #1
0
 public void AddColumnToSort(ColumnHeader col, ListViewOrderedColumns.MySortOrder sort, int order)
 {
     ListViewOrderedColumns.ColumnSortOrderInfo colSOI = lstVwOC.AddColumnToSortList(col, sort, order);
     RefreshColumnIcon(colSOI);
 }
		private void AddItemOrdenacao(ColumnHeader col, ListViewOrderedColumns.MySortOrder sort)
		{
			ListViewItem item = new ListViewItem();
			item.SubItems.AddRange(new string[]{string.Empty, string.Empty, string.Empty});			
			item.SubItems[columnHeader2.Index].Text = (lstVwOrdenacao.Items.Count + 1).ToString();
			item.SubItems[columnHeader3.Index].Text = col.Text;
			item.SubItems[columnHeader4.Index].Text = sort.ToString(); 
			item.Tag = col;
			lstVwOrdenacao.Items.Add(item);			
		}
Exemple #3
0
        private void RefreshColumnIcon(ListViewOrderedColumns.ColumnSortOrderInfo colSOI)
        {
            if (colSOI.columnSortOrder == ListViewOrderedColumns.MySortOrder.Descendente)
                colSOI.column.ImageIndex = firstOrderIconIndex + (2 * (colSOI.order - 1));
            else
                colSOI.column.ImageIndex = firstOrderIconIndex + (2 * (colSOI.order - 1)) + 1;

        }
		private void AddItemOrdenacao(ListViewOrderedColumns.ColumnSortOrderInfo col)
		{
			AddItemOrdenacao(col.column, col.columnSortOrder);
		}