如何在RunTime中使用DataGridView [英] How to Work on DataGridView in RunTime

查看:79
本文介绍了如何在RunTime中使用DataGridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生,我要求在DataGridView中使用项目的DropDownList创建一个新行。

选择项目费率后,应从项目主文件中填写。

之后当我输入数量时,金额应自动计算。

此外,还应自动生成新行或按下按钮。



将按钮保存为项目列表,其中

Dear Sir I require to Create a New Row in DataGridView with a DropDownList of Items.
After selecting a Item Rate should be filled from Item Master .
After that when I input the Quantity , Amount should be calculated automatically.
Also a new row should be generated automatically or by Button Press.

When Save the Button the list of Items with

Quantity 

Amount

应插入表格。



should insert into a table.

Select Items    Items	       Rate	Quantity  Amount
DropDownList	INJ Charges IM	30	2	    60
DropDownList	X-RAY	        250	1	    250
DropDownList				
		                Total Amount 	    310
				
Save				

推荐答案

您应该提供代码,以便更好地理解。



如果您的DataGridView是DataBound,您可以将新行添加到数据源,然后调用DataGridView.Refres h()方法。



如果不是数据绑定,可以使用DataGridView.Rows.Add()方法手动添加它。
You should provide your code so you can be understood better.

If your DataGridView is DataBound, you can add the new row to the data source, and then call the DataGridView.Refresh() method.

If it''s not data bound, you add it manually using DataGridView.Rows.Add() method.


这篇关于如何在RunTime中使用DataGridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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