Hi, im trying to do a filter, now what I want to do is to separate the Game Title into another textbox, any help appreciated
my code -

string tmp = textBox.Text;
string filterString = "[Platform]" + " LIKE '" + tmp + "*'" + "OR [Game Title]" + " LIKE '" + tmp + "*'";
this.tblGameBindingSource.Filter = filterString;

thanks

You have to explain a little bit more, like what is your input and what shall be your output? What kind of type is your tblGameBindingSource ? A SQL-Datasource?

maybe like this?

string tmp = textBox.Text;
      string filterString = string.Format("[Platform] LIKE '%{0}%' OR [Game Title] LIKE '%{0}%'",tmp);
      this.tblGameBindingSource.Filter = filterString;

But if you code like this you have to take care of sql injections.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.