Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to filter data in a dataview before binding to datagrid
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Web forms
Title:
How to filter data in a dataview before binding to datagrid
Miscellaneous
Thread ID:
00673397
Message ID:
00673397
Views:
49
I have a resultset returned from a stored procedure with the following fields:
----------------------------------------------------
roomname,schedfrom,schedto,  openslotstart,    openslotend
OR 1        700      1700   07/15/2002 17:01  07/15/2002 18:01      
OR 2        700      1700   07/15/2002 07:00  07/15/2002 08:01
I need to be able to filter the result to display only rows where the hour portion of the OpenSlotStart is between the schedfrom and schedto.

I tried the dataview.RowFilter but I can't figure out the right way to work it.
            oCommand.Connection = oConn

            dvRooms = VFPToolkit.vfpData.SqlExecute(oConn, oCommand, "deptview")
            VFPToolkit.vfpData.SqlDisConnect(oConn)

            dvRooms.RowFilter = "datepart(DateInterval.Hour,OpenTimeEnd)*100 < OpenTimeEnd"
Next
Reply
Map
View

Click here to load this message in the networking platform