如何在GridView中批量插入,更新,删除 [英] How to do bulk insert,update,delete in gridview

查看:112
本文介绍了如何在GridView中批量插入,更新,删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生

我有一个场景.将有一个gridview.

有一个编辑按钮,它在gridview之外.

单击编辑"按钮后,应启用gridview中的所有控件,我们可以编辑已存在的记录.通过单击添加新按钮"(在gridview外部),将添加一个新行.单击保存"按钮后,将保存包括新添加的行在内的所有记录. .此保存按钮在gridview之外

仅在单击编辑"后,添加新按钮"才会启用.

对于删除,gridview中的每一行都将具有删除按钮,单击删除按钮后,应删除该特定行.

请帮助我完成此任务

谢谢与问候

N.Ramachandran

Dear Sir

I got a scenario.There will be a gridview.

There is a edit button,this is outside the gridview.

after clicking edit button all the controls in gridview should be enabled,we can edit already existing records.By clicking add new button (outside gridview) one new row will be added.after clicking save button all the records including newly added rows will be saved.This save button is outside gridview

Only after clicking edit,add new button will be enabled.

For deletion each row inside gridview will have delete button ,after clicking delete button,that particular row should be deleted.

Please help me do this task

Thanks and Regards

N.Ramachandran

推荐答案

dataGridViewWorks.Rows.RemoveAt(dataGridViewWorks.CurrentCell.RowIndex);


这篇关于如何在GridView中批量插入,更新,删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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