数据源,网格视图和下拉列表

编程入门 行业动态 更新时间:2024-10-25 08:22:24
本文介绍了数据源,网格视图和下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好, 我有一个使用DataSource连接到DB的网格视图. 数据源具有一个查询,该查询从数据库中选择具有特定ID的项目. 另外,我有一个DropDown-List,我想更新dataSource的查询,因此,当用户从DropDown-List中选择某个索引时,它将在Grid View中显示相关数据. 请帮忙!

Hello, I have a Grid View that connected to DB with DataSource. The DataSource have a query that selects items from the DB that have a specific ID. also, I have a DropDown-List and I want to update the query of the dataSource so when the user selects some index from the DropDown-List it will show the relevant data in the Grid View . Please Help! Thanks.

推荐答案

使用BindingSource.Filter过滤您的dataGridView. 更改DropDownList_SelectedIndexChanged中的过滤器. Use BindingSource.Filter to filter your dataGridView. change the filter in DropDownList_SelectedIndexChanged.

更多推荐

数据源,网格视图和下拉列表

本文发布于:2023-08-05 21:35:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1308191.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:数据源   网格   视图   列表

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!