如何添加datagridview单元格值并在C#windows应用程序中的另一个单元格中显示 [英] How to add datagridview cell values and display in another cell in C# windows application

查看:83
本文介绍了如何添加datagridview单元格值并在C#windows应用程序中的另一个单元格中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在startno文本框列中有一个Datagridview和noofcheques下拉列表。

现在我想在textbox列中输入startno并从下拉总数中选择noofcheues将显示在endingno textbox列中。如何做到这一点。

请提供任何链接以供参考。

提前致谢。



我尝试过的:



我比较新鲜。我不明白从哪里开始。请帮帮我。

I have a Datagridview in that startno textbox column and noofcheques dropdown.
Now i want enter startno in textbox column and select noofcheues from dropdown total will be displayed in endingno textbox column.How to do it.
Please give anylink for reference.
Thanks in advance.

What I have tried:

I am fresher.I don't understand where to start.Please help me.

推荐答案

很容易使用javascript
it is Easy to using javascript


private void dgvwChqs_CellLeave(object sender, DataGridViewCellEventArgs e)
       {
           dgvwChqs.Rows[e.RowIndex].Cells["endingno"].Value = Convert.ToInt32(dgvwChqs.Rows[e.RowIndex].Cells["startno"].Value) + Convert.ToInt32(dgvwChqs.Rows[e.RowIndex].Cells["noofcheques"].Value);
       }







现在工作正常。如何插入datagridview使用c #windows application将数据发送到数据库表。请帮助我




It is working fine now.How to inserted datagridview data to database table using c# windows application.Please help me


这篇关于如何添加datagridview单元格值并在C#windows应用程序中的另一个单元格中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆