gridview rowdatabound asp.net [英] gridview rowdatabound asp.net

查看:71
本文介绍了gridview rowdatabound asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有bidhistory表,该表中有一个名为bidprice的字段.我想在gridview中填充出价,例如当产品1的出价为5时,因此价格较低且唯一的一个,我想获得此行.我该怎么做?请帮助我

i have bidhistory table and in that table there is one field named bidprice . i want fill bid price in gridview like when product 1 has 5 bid price so where price is lower and unique one i wanna get this row. how i do this?please help me

推荐答案

尝试以下代码以获取您的解决方案:

Try this code to get your solution:

create table Bidhistory
(
  bidid int,
  bidprice int
)
insert into Bidhistory values(1,100);
insert into Bidhistory values(1,50);
insert into Bidhistory values(1,100);
insert into Bidhistory values(1,50);
insert into Bidhistory values(1,75);

select distinct MIN(bidprice) from Bidhistory



输出:

50

然后尝试将其绑定到gridview



Output:

50

and then try to bind it gridview


这篇关于gridview rowdatabound asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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