bindingsource.filter syntax question
-
I've done some looking around and I'm a bit confused Here is an example of the data that's in the binding source [IMG]http://i38.tinypic.com/xfoimp.png\[/IMG\] what i want to do is sort on the 3rd row ( 4 or 3) and then sort by the date ( to see if the record is before a certian time my idea to do this was to filter the BS BS.count then unfiltered the BS The problem i keep running into is that i cant say that i want Just 4 or Just 3 What I've come up with so far is
private int deadlineCount(DateTime Time, int LeagueID)
{
int total = 0;
string league;
if (LeagueID == 99)
{
league = "";
}
else
{
league = LeagueID.ToString();
}BS.Filter = string.Format("LeagueID >= '{0}' and LeagueID <= '{0}'and \[End\] <#12/30/1899 {1}#", league, Time.ToString("h:mm tt")); total = BS.Count; BS.Filter = ""; return total; }
But i keep running into problems that i cant use any operator ( like ,> ,= ,>=,) becuase it can not preform X onn system.int32 and system.string. I've been looking around but all the example seem to be for strings or dates.