Data view with data from a SQL Database

9 views
Skip to first unread message

Merri

unread,
Aug 24, 2009, 3:05:19 PM8/24/09
to SharePoint Designer 2007 Discussions
I created a data view that pulls data from an SQL Database and a
stored procedure.

The data displays properly. I activated the "Enable sorting and
filtering on column headers (basic table layout only)" option in the
Data View Properties.

When viewing the page, the column headers will allow you to select a
filter or sort option, but the view does not respond display per the
selected criteria.

Any idea what's going on?

I've also tried to filter and group fields in the Data View Properties
as well, but the view doesn't change.

Thanks.

praveen

unread,
Aug 25, 2009, 1:39:12 AM8/25/09
to SharePoint Designer 2007 Discussions
Yes, It's the basic question from many people who did the same thing
and never succeeded.

Data view or any other control failed to get the results which matches
the given criteria by using SPROC in sql server*

Sorting never work with SPROC in Sharepoint data view control [reason
is below]. So, what i did was, any way we are completely customizing
page, i chosen grid view for my requirement which work perfectly.

What is happening when you bind SPROC as the data source to a data
view is, whenever the user selected something, it does a postback and
call the same SPROC and returns the results. So, no where this sorting
logic is called even you selected sorting option. If it is any other
data source like XML, list, library or any other it has the
functionality implemented and will sort based on the selection and
give results. But SPROC doesn't.

So, i can say better to go for Grid view or some custom programming
other than Data view when you deal with SPROCS.

http://praveenbattula.blogspot.com

serginho

unread,
Sep 12, 2009, 9:15:50 AM9/12/09
to SharePoint Designer 2007 Discussions
Yes we found that the sorting and filtering did not work with stored
procedures. We could only get it working with database views.
> > Thanks.- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages