多个存储过程调用gridview,具体取决于下拉列表选择 [英] multiple store procedure call for a gridview depending on dropdown list select

查看:69
本文介绍了多个存储过程调用gridview,具体取决于下拉列表选择的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我可以根据下拉列表选择的项目调用更多的One Store Procedure for grid-view吗?

我正在研究Asp .net(VS 2012)和SQL SERVER 2008 R2

在此先感谢... :)

Hello,
Can i call more then One Store Procedure for a grid-view depending on the drop-down list selected item?
I'm working on Asp.net(VS 2012) and SQL SERVER 2008 R2
Thanks in advance... :)

推荐答案

Hi Sumit,
您可以为事件调用尽可能多的存储过程,但绑定到网格视图的数据源必须是一个。这完全取决于你如何编写你的逻辑。



您可以使用dropdown_selectedindexchange事件,并根据用户单击的索引或值调用特定的逻辑/存储过程。



如果要使用两个不同列表中的数据,则必须组合两个数据表,然后将其分配给网格视图。我希望你理解我在这里描述的内容。



谢谢,

Prasath S J
Hi Sumit,
You can call as many as stored procedure for an event but the datasource that binds to the Grid View has to be one. This totally depends on how you write your logic.

you can use the dropdown_selectedindexchange event and based on the index or value that the user clicks you call the specific Logic/Stored procedure.

If you want to use data from two different list then you have to combine both the datatables and then assign that to the grid View. I hope you understant what I describe here.

Thanks,
Prasath S J


这篇关于多个存储过程调用gridview,具体取决于下拉列表选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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