because i need to bind 2 different result in 1 gridview, do you have any idea doing that? i have my sproc as below
from 1st return set, i will need to bind all result which with where cause, then for the 2nd return set i need bind all studName which already paid in the drop down list.
Now I already can display all value in the gridview, but i having problem to bind the data in the dropdownlist for user to select.
please help if you have idea on how to do that. Thanks in advance.
aoshi_kh
Member
123 Points
331 Posts
Re: how to bind dropdownlist datasource to different sql select statement?
Apr 09, 2012 12:30 PM|LINK
because i need to bind 2 different result in 1 gridview, do you have any idea doing that? i have my sproc as below
from 1st return set, i will need to bind all result which with where cause, then for the 2nd return set i need bind all studName which already paid in the drop down list.
Now I already can display all value in the gridview, but i having problem to bind the data in the dropdownlist for user to select.
please help if you have idea on how to do that. Thanks in advance.
ALTER
procedure [dbo].[usp_GetStudName]
AS
SET
NOCOUNT
ON
SELECT *
FROM StudentTbl St, CourseTble Ct
Where St.courseid = Ct.courseId
SET
NOCOUNT OFF
SELECT
UserName as FullName
FROM
StudentTbl
WHERE Paid <> '0'
RETURN