Gridview不显示记录取决于下拉选择 [英] Gridview not displaying records depend on drop down selection
问题描述
如何跳过下拉选择索引的网格列..
如果我选择全部它应该显示所有记录,如果我选择列表项依赖于下拉中的选择它应该显示网格跳过一列..我已采取存储过程如果否则阻止在其他我跳过一个列并写入存储过程,但这给出错误似乎我必须这样做用另一种方式..
如何根据下拉选项跳过网格中的列。??
帮助??
建议??
我尝试了什么:
存储过程我写过if else语句跳过else语句中的一列,给出列找不到错误..如何这样做..
How to skip a grid column on drop down select index..
if i select all it should display all Records , if i select list item depend on selection in drop down it should display grid skipping one column..I have taken a stored procedure if else block in else i have skipped a column and wrote stored procedure but that gives error seems i have to do it in another way..
How to skip a column in grid depending on drop down selection.??
help ??
suggestions??
What I have tried:
Stored procedure i have written if else statement skipping one column in else statement that gives column not found error.. how to do it..
推荐答案
在Search_Click中你正在调用
In Search_Click you are calling
BindGrid("GroupCode");
这意味着你是pa将值GroupCode
添加到您的存储过程。
强制执行以下查询:
which means you are passing the value "GroupCode"
to your stored procedure.
That forces the following query to run:
SELECT B.DoctorLastName + ', ' + B.DoctorFirstName AS DoctorName
,C.UpperLimit
,C.DownLimit
,C.isKMC
,C.KMCDOCCODE
FROM DoctorDetails B
INNER JOIN VRRatio C ON B.GroupCode = C.GroupCode
WHERE B.GroupCode = @GroupCode
我非常怀疑你的数据实际上是 B.GroupCode ='GroupCode'
尝试将按钮代码更改为
I doubt very much your data actually has B.GroupCode = 'GroupCode'
Try changing your button code to
BindGrid("ALL Groups");
或使用您知道的数据库中存在的特定组代码
or using a specific Group code that you know exists on your database
这篇关于Gridview不显示记录取决于下拉选择的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!