附加到数据绑定控件 [英] Attaching to data bound control

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

问题描述

首先在page_load事件中,我从数据库中获取数据,将数据附加到一个数据列表(iedatalist1)中,并再次根据数据列表中的列值(即人员愿望列表) 我再次从数据库得到下表(ietable no:1)。



表号:1

Product_id product_name category_name

101玻璃厨具

102瓶酒吧用品

103勺子厨具

105浴缸浴具



我有另一个数据清单控件(iedatalist2)并且在这个数据列表中我放置了一个转发器控件,我想将上表(即表号:1)拆分为表2,3,4并将这些表附加到转发器控件上。 />


表号:2

product_id Product_name category_name

101玻璃厨具

103勺厨具



表编号:3

Product_id Product_name category_name

102瓶酒具



表号:4

product_id product_name category_name

105浴缸浴缸





注意:根据我希望在转发器控件中显示表的更改,Category_name值根据人员愿望清单进行更改





请帮助我

解决方案

这可以单独使用转发器控制来完成。首先,您需要按类别名称对数据进行排序。然后您可以从下面链接获得其他信息



Asp.net repeater - 分组记录或数据 [ ^ ]


First in "page_load" event i get the data from database attached that data into one "data list"(i.e.datalist1) and again based on the column value(i.e."persons wish list") in "data list" again i got below table(i.e.table no:1) from data base.

table no:1
Product_id product_name category_name
101 glass kitchenware
102 bottle bar ware
103 spoon kitchenware
105 tub bath ware

I am having another "data list" control(i.e.datalist2) and with in this "data list" i placed one repeater control and i want to split the above table (i.e table no:1) like table no 2,3,4 and attach these tables to repeater control.

Table no:2
product_id Product_name category_name
101 glass kitchenware
103 spoon kitchenware

Table no:3
Product_id Product_name category_name
102 bottle bar ware

Table no:4
product_id product_name category_name
105 tub bath ware


Note:The Category_name values are changing based on person wish list according to the changes i want to display tables in repeater control


Please kindly help me

解决方案

This can bet done using repeater control alone .First you need to sort your data by category name. Then rest of the information you can get from below link

Asp.net repeater – group records or data[^]


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

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