如何使用c#使用gridview中的下拉列表更新记录 [英] how to update record using dropdownlist in gridview using c#

查看:85
本文介绍了如何使用c#使用gridview中的下拉列表更新记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在gridview的下拉列表中有三个字段。待解决,解决,升级。



当我第一次提交它应该显示待处理的记录时,然后从下拉列表中我想更新它以解决或升级,它将是使用数据库下拉列表进行更新。我怎么做这个过程

i want three fields in dropdown list in gridview . Pending , Solved , Escalate.

when i first submit the record it should show pending , then from dropdown i want to update it to solved or escalate , and it will be update with dropdown in database . how can i do this process

推荐答案





你需要按照以下步骤操作:



1.创建一个名为status_master的主表文件必须是id,状态如



ID状态



1解决了



2待定




它将成为状态表



2.现在在每个问题的其他表中输入status_master的id来显示问题的状态,你可以使用id status_master的字段为fk。

3.现在绑定表status_master中的dropdownlist与datavalue fiels是id

4.现在在dropdownlistselectionindexchnaged甚至写查询到在下拉列表中根据选定的ID找到该值。



希望你得到我的观点,如果不让我知道我很想解释它的清洁和喜欢单独的问题



谢谢。
Hi,

you need to follow below steps :

1. Make a master table named status_master fileds must be id,status like

ID Status

1 Solved

2 Pending


it ll be table for status

2. Now in other table for each question put id of status_master to show thestatus of question you can make id field of status_master as fk.
3. Now on bind the dropdownlist from the table status_master with the datavalue fiels is id
4. now on the dropdownlistselectionindexchnaged even write the query to find the value on the basis of selected id in dropdownlist.

Hope you got my point if not let me know i am keen to explain it clealry and love to sole the problem

Thanks.


这篇关于如何使用c#使用gridview中的下拉列表更新记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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