Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
.NET
.NET Assemblies
.NET Core
.NET Standard
Active Directory
ADO.NET
Agile Development
AJAX
Alexa Skills
Algorithms in C#
Android
Angular
Architecture
ArcObject
Artificial Intelligence
ASP.NET
ASP.NET Core
Augmented Reality
Aurelia
AWS
Azure
Backbonejs
Big Data
BizTalk Server
Blockchain
Bootstrap
Bot Framework
Business
C#
C# Corner
C, C++, MFC
Career Advice
Chapters
CIO
Cloud
COBOL.NET
Coding Best Practices
Cognitive Services
COM Interop
Compact Framework
Cortana Development
Cryptocurrency
Cryptography
Crystal Reports
Current Affairs
Custom Controls
Cyber Security
Data Mining
Databases & DBA
Design Patterns & Practices
DevOps
DirectX
Dynamics CRM
Enterprise Development
Entity Framework
Error Zone
Exception Handling
Expression Studio
F#
Files, Directory, IO
Games Programming
GDI+
General
Generative Engine Optimization (GEO)
Google Cloud
Google Development
Graphics Design
Hardware
Hiring and Recruitment
HoloLens
How do I
HTML 5
Internet & Web
Internet of Things
Ionic
iOS
Java
Java and .NET
JavaScript
JQuery
JSON
JSP
Knockout
kotlin
Leadership
Learn .NET
LightSwitch
LINQ
Machine Learning
Microsoft 365
Microsoft Office
Microsoft Phone
Mobile Development
Multithreading
Nano Banana
NetBeans
Networking
Node.js
Office Development
OOP/OOD
Open Source
Operating Systems
Oracle
Outsourcing
Philosophy
PHP
Power BI
Printing in C#
Products
Progressive Web Apps
Project Management
Python
Q#
QlikView
R
React
Reports using C#
Robotics & Hardware
Ruby on Rails
Salesforce
Security
Servers
SharePoint
SignalR
Silverlight
Smart Devices
Software Testing
SQL Language
SQL Server
Startups
String in C#
Swift
TypeScript
Unity
UWP
Visual Basic .NET
Visual Studio
WCF
Wearables
Web Development
Web Services
Web3
Windows 10
Windows Controls
Windows Forms
Windows PowerShell
Windows Services
Workflow Foundation
WPF
Xamarin
XAML Standard
XML
XNA
XSharp
Register
Login
1
Answer
how to search number value in datagridview by textbox
asmita patil
10y
569
0
1
Active Directory
Reply
here is my code:
Home
»
C# Language
»
search form_number in datagridview through textbox
Author
Question
asmita patil
search form_number in datagridview through textbox
Posted
on 04 Feb 2015
i am success in searching name in datagridview using query..
but not idea for serching number in datagridview
i want to search form_number in datagridview
can any one give me that query pattern
in that LIKE operator is not working.....
Reply
Quick Reply
Report a Spam
Author
Reply
Abhijit Patil
1
0
Re: search form_number in datagridview through textbox
Posted
on 04 Feb 2015
hey asmita,
can you elobrate your question please .then we understand what exazactly you want .then we provide correct solution.
hope you understand
thanks and Regards,\ Abhijit Patil dotnetbyabhipatil.blogspot.in
Reply
Quick Reply
asmita patil
0
0
Re: search form_number in datagridview through textbox
Posted
on 04 Feb 2015
following is my code..
private void txt_frm_filter_value_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
if (cmb_frm_filter_search_type.SelectedItem.Equals("Form no."))
{
BindingSource bs = new BindingSource();
bs.DataSource = dgv_emp_search.DataSource;
bs.Filter = dgv_emp_search.Columns[0].HeaderText + "Like " + Convert.ToInt32(txt_frm_filter_value.Text) + " ";
//bs.Filter = dgv_emp_search.Columns[0].HeaderText = Convert.ToUInt64(txt_frm_filter_value.Text);
// if (dgv_emp_search.Columns[0].Equals(searchValue))
//bs.Filter = dgv_emp_search.Columns[0].HeaderText.ToString() + " LIKE '%" + Convert.ToInt32(txt_frm_filter_value.Text) + "%'";
dgv_emp_search.DataSource = bs;
//valueResulet = false;
}
else if (cmb_frm_filter_search_type.SelectedItem.Equals("First name "))
{
BindingSource bs = new BindingSource();
bs.DataSource = dgv_emp_search.DataSource;
bs.Filter = dgv_emp_search.Columns[1].HeaderText.ToString() + " LIKE '%" + txt_frm_filter_value.Text + "%'";
dgv_emp_search.DataSource = bs;
}
}
}
txt_frm_filter_value is the name of textbox
cmb_frm_filter_search_type is name of combobox where we can select a search type like first name, last name, and form number
now my problem is : in my datagridview lots of record will be come from different tables , that is employee form number wise...
so i want to search directly form number in datagridview..
i cant search form number in datagridview..
my query is not set valid....
Post
Reset
Cancel
Answers (
1
)
Related Discussion