编辑datagriview 1)如何实现在表格中入力了单价,数量两列后自动算出金额填到单独的列中。2)如何让combox列可以编辑

解决方案 »

  1.   

    在CellFormatting事件中可以算,然后写到指定的cell
      

  2.   

    1、CellParsing 事件处理
    2、DropDownStyle = DropDownList
      

  3.   

    combox列可以编辑,一定不是dropdownlisthttp://hi.baidu.com/goga/blog/item/5bd4908f5f2685f2503d92cf.html
    看到有这种做法,但是我的combox是绑定表中的1列,如果这样需要添加编辑数据到数据库,而没有这个需要。
      

  4.   


     可以的;   LZ同样可以试试用js来代替呀!
      

  5.   

    有好用的控件吗(grid中可以加入combox)?免费的!
    谢谢!
      

  6.   

    grid中可以加入combox?
    可以
      

  7.   


    用友cell表
    好像是开发收费
      

  8.   

    http://topic.csdn.net/u/20090707/10/b94b449f-e90c-481a-ba76-660af71396f5.html?35235
      

  9.   

    没问清楚
    有好用的(grid中可以加入combox)的控件吗?:)
    用友Cell 5.0:挑战Excel的黑马==〉不是一类东西吧?
    没有关于可编辑的处理
    谢谢
      

  10.   

    类似于这样不行吗?
    private void dataGridView1_CellMouseLeave(object sender, DataGridViewCellEventArgs e)
            {
                dataGridView1.CurrentRow.Cells[2].Value =int.Parse(dataGridView1.CurrentRow.Cells[0].Value.ToString()) +int.Parse(dataGridView1.CurrentRow.Cells[1].Value.ToString());        }
      

  11.   

    用DevExpress的 GridControl吧,或者FarPoint SpreadSheet ,DataGridView仅有基本的功能。
    但是第三方控件也存在些问题,比如使用习惯和MS的不太一样,需要时间适应