コード例 #1
0
        /// <summary>
        /// Hides the row focus border for the specified row index.
        /// </summary>
        /// <param name="treeGrid">
        /// The corresponding treeGrid to hide the row focus border.
        /// </param>
        /// <param name="rowIndex">
        /// The corresponding row index to hide row focus border.
        /// </param>
        internal static void HideRowFocusBorder(this SfTreeGrid treeGrid)
        {
            TreeDataRowBase row = treeGrid.RowGenerator.Items.FirstOrDefault(item => item.IsFocusedRow);

            if (row != null)
            {
                row.IsFocusedRow = false;
            }
        }
コード例 #2
0
        /// <summary>
        /// Shows the row focus border for the specified row index.
        /// </summary>
        /// <param name="treeGrid">
        /// The corresponding treeGrid to enable the row focus border.
        /// </param>
        /// <param name="rowIndex">
        /// The corresponding row index to enable row focus border.
        /// </param>
        internal static void ShowRowFocusBorder(this SfTreeGrid treeGrid, int rowIndex)
        {
            if (treeGrid.NavigationMode != NavigationMode.Row)
            {
                return;
            }
            TreeDataRowBase row = treeGrid.RowGenerator.Items.FirstOrDefault(item => item.RowIndex == rowIndex);

            if (row != null && !row.IsSelectedRow)
            {
                row.IsFocusedRow = true;
            }
        }
コード例 #3
0
        /// <summary>
        /// Hides the selection background for the specified row index.
        /// </summary>
        /// <param name="treeGrid">
        /// The corresponding treeGrid to hide the selection background.
        /// </param>
        /// <param name="rowIndex">
        /// The corresponding row index to hide the selection background.
        /// </param>
        internal static void HideRowSelection(this SfTreeGrid treeGrid, int rowIndex, TreeNode treeNode = null)
        {
            TreeDataRowBase row = treeGrid.RowGenerator.Items.FirstOrDefault(item => item.RowIndex == rowIndex);

            if (row != null)
            {
                row.IsSelectedRow = false;
            }
            if (treeGrid.CheckBoxSelectionMode == CheckBoxSelectionMode.Default || treeNode == null)
            {
                return;
            }

            if (treeNode.IsChecked == true)
            {
                treeGrid.NodeCheckBoxController.SetIsCheckedState(treeNode, false);
            }
        }