使用ListView编辑数据库 [英] using ListView to edit the database

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

问题描述

伙计们,在这里我的项目需要帮助!我有一个列表视图,该列表视图从数据库(sql)检索某些雇员信息,但是当用户在列表视图控件上选择一个雇员时,需要在另一种表单上显示所选雇员的完整信息(信息加上未在listview控件上列出).以及如何通过编辑listView项来更新数据库.

在此先感谢.......

Guys, I need help on my project here! I have a list view which retrieves some of the employee information from the database(sql), but I need when user select one of the employee on the list view control to display a full information of the selected employee on another form (information plus that not listed on the listview control). And also how to update the database by edit the listView items.

Thanks in advance.......

推荐答案

使用ListView的ItemTemplate中的超链接字段并将其Target属性设置为_blank.当执行更新操作时,会触发一个更新事件,只需向该事件添加代码以更新该特定行即可.如果您是新手,请参阅一些文章.
快乐编码
Use hyperlink field in ItemTemplate of ListView and set it Target property to _blank. There is an update event which is fired when an update operation is performed just add code to that event for updating that particular row and you''re on. Refer to some article if you''re a newbie.
Happy Coding


这篇关于使用ListView编辑数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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