按类别添加数据 [英] add data by category

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

问题描述

大家好.我在按类别将数据库中的数据获取到数据网格时遇到问题.

我有7个datagrid和1个数据库.
我想要的是每1个datagrid 1类.

例如.

在我的gee 51表格中.
我只需要该数据网格上的gee 51数据.

在另一张桌子.交叉功能
我只需要交叉函数数据.

我希望您能提供帮助.

hey guys. i have a problem in getting data from my database to my datagrid by category.

i have 7 datagrid and 1 database.
and i want is in every 1 datagrid 1 category.

for example.

in my table for gee 51.
i want only gee 51 data on that datagrid.

in for another table. cross funtion
i want only cross function data.

i hope you can help.

推荐答案

然后为每个类别创建一个不同的数据表
then create a different datatable for each category


u可以根据您的类别过滤数据在数据库中返回每个类别的多个表并绑定到每个gridview.

您可以在前端使用RowFilter属性根据您的类别进行过滤.
u can filter data according to your category in database which return several tables of each category and binds to every gridview.
OR
U can use RowFilter property in frontend to filter according to ur category.


,而我希望位于每1个datagrid 1类别中.
很高兴知道你想要的.现在尝试!您需要做的事情之一是:
1.一次获取所有数据,并使用DataView根据类别过滤数据并将其绑定到网格.
2.从数据库中获取类别特定的数据,并将其绑定到网格.

这里没有新内容.如果您知道从数据库中获取数据并绑定一个,那么您就可以做到.您所需要做的就是通过查询或数据视图过滤每个数据.

试试吧!
and i want is in every 1 datagrid 1 category.
Good to know you want. Now try out! All you need is to do one of the things:
1. Get all the data at once and filter the data based on category using DataView and bind it to the grids.
2. Get category specific data from database and bind it to grid.

There is nothing new here. If you know bringing data from DB and binding for one then you can do it. All you need is filtered data for each either via query or dataview.

Try!


这篇关于按类别添加数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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