当前位置:首页 » 软件开发
开发技术指南» 文章正文
    引言: 关于datagrid的问题,如何使行宽不可由用户更改。
 

 

    摘要:闻richard grimes对.net的反戈一击及其相关言论有感 我住在学校宿舍,要上网只能拨号,所以想要上网只能一周去一两次网吧或学校机房。昨晚计划外去了一趟学校机房,顺便浏览了一眼csdn。惊悉几天前.net专家richard grimes对.net阵营的反戈一击,表示“microsoft is losing confidence in .net”以及引起的轩然大波,......
    摘要:微软的下载都是通过一个detail页面转到下载,单线程真的让我很不爽,所以用wsockexpert抓下来实际地址好用flashget来下。(感谢yiruoyun的专栏 aspx">http://blog.csdn.net/yiruoyun/archive/2004/10/14/136128.aspx)注:一定要先安装dotnet framework version 2.0(第二个:dotnetfx......


DataGrid相关知识总结(收集自各位老大处)

关于datagrid的问题,如何使行宽不可由用户更改.(即行宽固定,不能通过拖拉的方式改变)定义datagrid的时候就把宽度设定<asp:boundcolumn ...>                       <headerstyle width="150px"></headerstyle>

textbox1.text=mydatagrid(mydatagrid.currentcell.rownumber,0)textbox2.text=mydatagrid(mydatagrid.currentcell.rownumber,1)........ 【程序编程相关:使用模板列获取批量获取DataGrid中

如何在winform中datagrid点击某行,使数据实时显示在textbox中?datagrid的keypress事件中 【推荐阅读:自己用C#开发的EMAIL地址抓取程序。

namespace datagriddoubleclick{ using system; using system.drawing; using system.collections; using system.componentmodel; using system.windows.forms; using system.data; 【扩展信息:什么是Web Service?

以此类推

 public class form1 : system.windows.forms.form {  private system.windows.forms.datagrid datagrid1;  private dataset mydataset;  datetime gridmousedowntime;    private system.windows.forms.label label1;    private system.componentmodel.container components = null;

  public form1()  {   initializecomponent();   gridmousedowntime = datetime.now;   setup();  }

  private void setup()  {   // 用2个table与1与relation创建dataset   makedataset();   // 数据绑定   datagrid1.setdatabinding(mydataset, "customers");

   //添加样式   addcustomdatatablestyle();  }

  private void makedataset()  {   // 创建dataset.   mydataset = new dataset("mydataset");          // 创建2个datatables.   datatable tcust = new datatable("customers");      // 创建两个列,并添加到第一个表   datacolumn ccustid = new datacolumn("custid");   datacolumn ccustname = new datacolumn("custname");   datacolumn ccurrent = new datacolumn("custcity");   tcust.columns.add(ccustid);   tcust.columns.add(ccustname);   tcust.columns.add(ccurrent);

   // 把tables添加到dataset.   mydataset.tables.add(tcust);          /* 计算tables.对每个客户,创建datarow变量 */   datarow newrow1;      // 添加记录到 customers table.   for(int i = 1; i < 4; i++)   {    newrow1 = tcust.newrow();    newrow1["custid"] = (100*i).tostring();    tcust.rows.add(newrow1);   }

   tcust.rows[0]["custname"] = "";   tcust.rows[1]["custname"] = "net_lover";   tcust.rows[2]["custname"] = "http://xml.sz.luohuedu.net/";

   tcust.rows[0]["custcity"] = "北京";   tcust.rows[1]["custcity"] = "上海";   tcust.rows[2]["custcity"] = "河南";  }

  private void addcustomdatatablestyle()  {   datagridtablestyle ts1 = new datagridtablestyle();   ts1.mappingname = "customers";   // 设置属性   ts1.alternatingbackcolor = color.lightgray;

   // 添加textbox列样式,以便我们捕捉鼠标事件   datagridtextboxcolumn textcol = new datagridtextboxcolumn();   textcol.mappingname = "custid";   textcol.headertext = "序号";   textcol.width = 100;

   //添加事件处理器   textcol.textbox.mousedown += new mouseeventhandler(textboxmousedownhandler);   textcol.textbox.doubleclick += new eventhandler(textboxdoubleclickhandler);   ts1.gridcolumnstyles.add(textcol);

   textcol = new datagridtextboxcolumn();   textcol.mappingname = "custname";   textcol.headertext = "姓名";   textcol.width = 100;   //添加事件处理器   textcol.textbox.mousedown += new mouseeventhandler(textboxmousedownhandler);   textcol.textbox.doubleclick += new eventhandler(textboxdoubleclickhandler);   ts1.gridcolumnstyles.add(textcol);

   textcol = new datagridtextboxcolumn();   textcol.mappingname = "custcity";   textcol.headertext = "地址";   textcol.width = 100;   //添加事件处理器   textcol.textbox.mousedown += new mouseeventhandler(textboxmousedownhandler);   textcol.textbox.doubleclick += new eventhandler(textboxdoubleclickhandler);   ts1.gridcolumnstyles.add(textcol);      datagrid1.tablestyles.add(ts1);     }

  protected override void dispose( bool disposing )  {   if( disposing )   {    if (components != null)     {     components.dispose();    }   }   base.dispose( disposing );  }


...   下一页
    摘要: .net将原来独立的api和sdk合并到一个框架中,这对于程序开发人员非常有利。它将cryptoapi改编进.net的system.security.cryptography名字空间,使密码服务摆脱了sdk平台的神秘性,变成了简单的.net名字空间的使用。由于随着整个框架组件一起共享,密码服务更容易实现了,现在仅仅需要学习system.security.cryptography名字空间的功能和用......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE