当前位置: 首页>>代码示例>>C#>>正文


C# GridPanel.SetSelectedRows方法代码示例

本文整理汇总了C#中GridPanel.SetSelectedRows方法的典型用法代码示例。如果您正苦于以下问题:C# GridPanel.SetSelectedRows方法的具体用法?C# GridPanel.SetSelectedRows怎么用?C# GridPanel.SetSelectedRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GridPanel的用法示例。


在下文中一共展示了GridPanel.SetSelectedRows方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ProcessSelectAll

        private void ProcessSelectAll(GridPanel panel, 
            GridContainer item, bool ckey)
        {
            if (item.Rows != null && item.Rows.Count > 0)
            {
                item.Expanded = true;

                foreach (GridContainer row in item.Rows)
                {
                    if (row is GridGroup)
                    {
                        ProcessSelectAll(panel, row, ckey);
                    }
                    else
                    {
                        int startIndex = ((GridContainer)item.Rows[0]).GridIndex;
                        int endIndex = ((GridContainer)item.Rows[item.Rows.Count - 1]).GridIndex;

                        if (ckey == true)
                        {
                            for (int i = startIndex; i <= endIndex; i++)
                                panel.SetSelectedRows(i, 1, !panel.IsRowSelected(i));
                        }
                        else
                        {
                            panel.SetSelectedRows(startIndex, endIndex - startIndex + 1, true);
                        }

                        break;
                    }
                }
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:33,代码来源:GridGroup.cs

示例2: ProcessControlExtend

        private void ProcessControlExtend(GridPanel panel, bool extend)
        {
            if (panel.LastProcessedItem == null)
                panel.LastProcessedItem = _MouseDownHitRow;

            GridContainer lastRow = panel.LastProcessedItem as GridContainer;

            if (lastRow != null)
            {
                int startIndex = lastRow.GridIndex;
                int endIndex = _HitItem.GridIndex;

                panel.NormalizeIndices(extend,
                    _AnchorIndex, ref startIndex, ref endIndex);

                for (int i = startIndex; i <= endIndex; i++)
                {
                    if (extend == false || i != _AnchorIndex)
                        panel.SetSelectedRows(i, 1, !panel.IsRowSelected(i));
                }

                InvalidateRows(panel, startIndex, endIndex, true);
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:24,代码来源:GridRow.cs

示例3: ProcessSelect

        private void ProcessSelect(GridPanel panel, bool ckey, bool skey)
        {
            int index = GridIndex;

            if (ckey == true)
                panel.SetSelectedRows(index, 1, !panel.IsRowSelected(index));
            else
                panel.SetSelectedRows(index, 1, true);

            panel.SetActiveRow(this, true); 

            if (skey == false && ckey == false)
                panel.InvalidateRender();
            else
                InvalidateRender();
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:16,代码来源:GridGroup.cs

示例4: ExtendSelection

        internal void ExtendSelection(
            GridPanel panel, GridContainer endItem, bool extend)
        {
            int startIndex = panel.SelectionRowAnchor.GridIndex;
            int endIndex = endItem.GridIndex;

            panel.NormalizeIndices(false, 0, ref startIndex, ref endIndex);

            if (panel.OnlyRowsSelected(startIndex, endIndex) == false)
            {
                if (extend == false)
                    panel.ClearAllSelected();
                else
                    panel.ClearAll(false);

                panel.SetSelectedRows(startIndex, endIndex - startIndex + 1, true);

                GridContainer row = GetLastProcessedRow(panel);

                if (extend == true && row != null)
                    startIndex = row.GridIndex;

                InvalidateRows(panel, startIndex, endIndex, extend);
            }
        }
开发者ID:huamanhtuyen,项目名称:VNACCS,代码行数:25,代码来源:GridContainer.cs


注:本文中的GridPanel.SetSelectedRows方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。