相关文章  
  • Visual Studio 2005中C++的变化
  • 使用Reporting Services窗体身份验证
  • 动态下拉菜单的简单实现
  • 如何实现日期比较 显示五天内日期
  • 构建一个弹出式图象按钮
  • C#与Excel的交互功能代码实例
  • 用 C# 通过内码实现汉字转化为拼音
  • 如何用c#来制作一个activeX控件或类似的东西
  • 谈 WinDbg 之 InternalCall 的使用与实现
  • 谈 WinDbg 之 AppDomain 的创建过程
  •   推荐  
      科普之友首页   专利     科普      动物      植物        天文   考古   前沿科技
     您现在的位置在:  首页 >>文献 >>培训

    DataGrid 中由某列的值设定行的颜色3

    itionally set the foreBrush and/or backbrush
      // depending upon some crireria on the cell value
      // Here, we color anything that begins with a letter higher than 'F'
      try
      {
      //从DataView中取值,"ItemType"为行的名称
      string colValue = this.BindingDataView[rowNum]["ItemType"].ToString();
      char val = colValue[0];
      
      if( val > 'F' ) //如果首字母大于 'F'
      {
      backBrush = new SolidBrush(Color.BlueViolet );
      foreBrush = new SolidBrush(Color.White);
      }
      }
      catc

    页码:[1] [2] [3] [4] [5]3页、共5页

         

          设为首页       |       加入收藏       |       广告服务       |       友情链接       |       版权申明      

    Copyriht 2007 - 2008 ©  科普之友 All right reserved