Winforms: Missing operand after 'Number' operator

Winforms: Missing operand after 'Number' operator

I am trying to bind my textbox1 with the datagridview2 so that the textbox can filter the row when the value in textbox and datagridview matches. However, I kept getting the above error. Below is my code

I am trying to bind my textbox1 with the datagridview2 so that the textbox can filter the row when the value in textbox and datagridview matches. However, I kept getting the above error. Below is my code

private void textBox1_TextChanged(object sender, EventArgs e)
    {
     (dataGridView2.DataSource as DataTable).DefaultView.RowFilter = string.Format("Vehicle Number LIKE '%{0}%'", textBox1.Text); //error here
     }   


c-sharp database

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five

C. C++. C#. 차이점 알려드림. 5분 순삭. Explain C.C++.C#. Like I'm Five. 아시죠? C는 C++.C# 줄인말이 아니라는거?

Learn how to perform CRUD operations using C Sharp

QuickStart: CRUD Operations in C Sharp. Learn how to perform CRUD operations using C Sharp for MongoDB databases.

Loops in C++ | For, While, and Do While Loops in C++

In this Video We are going to see how to use Loops in C++. We will see How to use For, While, and Do While Loops in C++.

Using isdigit() in C/C++

In this article, we'll take a look at using the isdigit() function in C/C++. This is a very simple way to check if any value is a digit or not. Let's look

C++ Tutorial for Beginners 19 - C++ Structures | Struct declaration | C++ Data Structures

Welcome to this course on C++ Tutorial for Beginners. In this video we will see How to use C++ Structures.