Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dataview returns 0 records, but it's source dataset is ok

Status
Not open for further replies.

RandyBlackburn

Programmer
Oct 1, 2002
153
US
I have a dataset (dsEmp1), a dataview (dvEmpActive), a datagrid(LeadGrid) and a dropdownlist(ddlRep) as a template in the grid.

The source table of the dataview is dsemp1.employee. Right now the rowfilter is empty, and the sort is on EmpLastFirst.

When I use the dataset as the datasource for the dropdownlist, it populates nicely. However, if I change the datasource to the dataview (leaving the other propertiess the same), I get no records (even if I remove the rowfilter).

I'm doing this because I want to filter and sort the returned records for the dropdownlist. I must be really tired... I use similar logic on another page, and it works ok.

Any help would be appreciated... Sending the logic won't help to much, since I'm using the IDE.

Randy
 
I found the problem. I had forgotten that dataview states have to be refreshed after postbacks, while datasets retain their states. Used a session. Also had to specifically databind the dropdown... Bit of a pain. It would seem easier to allow filtering/sorting in the dropdown...f possible.

Randy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top