zoukankan      html  css  js  c++  java
  • DotNetBar 使用笔记

    1.删除表格的某一行数据,必须是VirtualMode  = false 的时候才生效,不然就只是灰色

    SuperDBG_Right.PrimaryGrid.SetDeletedRows(SuperDBG_Right.PrimaryGrid.ActiveRow.RowIndex, 1, true, false);

    SuperGrid 删除某一行数据,在VirtualMode = true 模式下无法正常删除,必须调用PurgeDeletedRows 方法; =false 下一切正常

    //VirtualMode = true 模式下无法正常删除,开始只标记某一行颜色    SuperDBG_Main.PrimaryGrid.ActiveRow.CellStyles.Default.TextColor =  Color.Red; 后来问过才知道有这个方法
    SuperDBG_Main.PrimaryGrid.SetDeletedRows(SuperDBG_Main.PrimaryGrid.ActiveRow.Index,1,true,false);
    SuperDBG_Main.PrimaryGrid.PurgeDeletedRows();

    2.DataGridView 数据加载     https://www.codeproject.com/Articles/23937/Paging-Data-with-DataGridView-in-VirtualMode

    Paging Data with DataGridView in VirtualMode  

    public partial class Form1 : Form
    {
        const int PAGE_SIZE = 5000;
    
        NameListCache _cache = null;
    
        public Form1()
        {
            InitializeComponent();
    
            _cache = new NameListCache( PAGE_SIZE );
    
            dataGridView1.CellValueNeeded +=
                new DataGridViewCellValueEventHandler( dataGridView1_CellValueNeeded );
    
            dataGridView1.VirtualMode = true;
    
            dataGridView1.RowCount = (int)_cache.TotalCount;
        }
    
        private void dataGridView1_CellValueNeeded
            ( object sender, DataGridViewCellValueEventArgs e )
        {
            _cache.LoadPage( e.RowIndex );
    
            int rowIndex = e.RowIndex % _cache.PageSize;
    
            e.Value = _cache.CachedData[rowIndex][e.ColumnIndex];
        }
    } 
    View Code

     

  • 相关阅读:
    IP地址
    ACL访问控制列表
    DHCP原理及配置
    VRRP原理及配置
    ASP.NET CORE RAZOR :向 Razor 页面应用添加模型
    HBuilder + PHP开发环境配置
    添加相关功能
    基于stm32的水质监测系统项目基础部分详细记录
    表单数据验证方法(二)——ASP.NET后台验证
    表单数据验证方法(一)—— 使用validate.js实现表单数据验证
  • 原文地址:https://www.cnblogs.com/maanshancss/p/7884258.html
Copyright © 2011-2022 走看看