Ejemplo n.º 1
0
        /// <summary>
        /// Finds the first <see cref="RowSelectorColumn"/> in the given <see cref="DataGrid"/>.
        /// </summary>
        /// <param name="grid">The <see cref="DataGrid"/> to search.</param>
        /// <returns>The <see cref="RowSelectorColumn"/> found, or null.</returns>
        public static RowSelectorColumn FindColumn(DataGrid grid)
        {
            RowSelectorColumn foundCol = null;

            foreach (DataGridColumn col in grid.Columns)
            {
                foundCol = col as RowSelectorColumn;
                if (foundCol != null)
                {
                    return(foundCol);
                }
            }
            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Finds the first <see cref="RowSelectorColumn"/> in the given <see cref="DataGrid"/> after or at the given column index.
        /// </summary>
        /// <param name="grid">The <see cref="DataGrid"/> to search.</param>
        /// <param name="startIndex">The index of the column to start the search.</param>
        /// <returns>The <see cref="RowSelectorColumn"/> found, or null.</returns>
        public static RowSelectorColumn FindColumn(DataGrid grid, Int32 startIndex)
        {
            RowSelectorColumn foundCol = null;

            for (Int32 i = startIndex; i < grid.Columns.Count; i++)
            {
                foundCol = grid.Columns[i] as RowSelectorColumn;
                if (foundCol != null)
                {
                    return(foundCol);
                }
            }
            return(null);
        }
Ejemplo n.º 3
0
		protected void VU_Init(object sender, System.EventArgs e)
		{
			RowSelectorColumn rs1 = new RowSelectorColumn();
			rs1.SelectionMode = ListSelectionMode.Single;
			grdBuildTypes.Columns.Add(rs1);
			RowSelectorColumn rs2 = new RowSelectorColumn();
			rs2.SelectionMode = ListSelectionMode.Single;
			grdAvailableBuildTypes.Columns.Add(rs2);
		}