Results 1 to 4 of 4

Thread: [2005] CAST/CONVERT Function in DataView Rowfilter

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member Jonny1409's Avatar
    Join Date
    Mar 2005
    Posts
    308

    [2005] CAST/CONVERT Function in DataView Rowfilter

    Hello,

    Can anyone help me with the syntax for this please ?

    I have a Datagridview which is populated by data in a dataview.
    I want to filter the dataview on the Date Column using the RowFilter option, so the dates in the column will only be those later than today.

    I don't really know how to do this, and additionally as the Date in SQL Server is held as Char(10) and not a datetime, when I bring the data in I also need to Cast/Convert it first.

    I don't know the syntax for this though, so can anyone please help me ?

    My code is as follows, and it's the syntax for 'xxx' I'm looking for :
    VB Code:
    1. dv = New DataView(ds.Tables(0))
    2. dv.RowFilter = xxx
    3. dgvDays.DataSource = dv
    Last edited by Jonny1409; Jan 25th, 2007 at 05:12 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width