473,383 Members | 1,834 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

search for a value in a Datagridview

I am developing a windows application. i have a datagridview control in this applicaion. now i need to search for a value in this datagridview control. i am populating the value by a dataset in this grid.
Apr 9 '10 #1
3 13917
semomaniz
210 Expert 100+
Please show us what exactly you have done so far.
Apr 9 '10 #2
string searchString = this.dtToday.Text;
foreach (DataGridViewRow row in grdClientDetails.Rows)
{
if(row.Cells["Followup Date"].Value.ToString().Contains(searchString ))
{
grdClientDetails.Rows[row.Index].Selected=true;

break;
}


it is working but, it cant select more than one row at a tome.
Apr 10 '10 #3
semomaniz
210 Expert 100+
This is what i would do. Add a check box inside the gridview as a templatefield. Then instead of selecting the row i would check the check box. This should give you multiple rows being checked
Apr 21 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Job Lot | last post by:
How can I filter/search records in DataGridView after filling it with data? The BindingNavigator provides default functionality for navigating, adding, deleting and saving records. Is there...
0
by: DraguVaso | last post by:
Hi, I'm using the DataGridView in VB.NET 2.0. The DataSource is a Generic List of a custom class0: lstMyPersonnes = New List(Of clsPersonne). When I add a new clsPersonne to lstMyPersonnes,...
4
by: Terry | last post by:
Hi, I am both new to .Net (coming from VB6 and DAO) and to this news group. I am trying to convert some code from VB6 that uses a "record set" to help the user locate a specific record. As the...
4
by: Matt | last post by:
I have been searching all over the web for a way to sort a DataGridView based on the actual text being shown in a ComboBox column as opposed to the underlying value (an ID in this case). Can anyone...
6
by: Mark | last post by:
Hello, How do you search a datagridview for given column values? Any help would be greatly appreciated! Thanks in advance
1
by: PawelR | last post by:
Hi Group, In my application I have DataTable which is displayed in DataGridView via DataView: DataView myView = new DataView(myTable); myDataGridView.DataSource = myView; One column im...
0
by: BD | last post by:
I am in the process of developing new front end program for SQL database to replace MS Access front end. I have been unable to convert the following lines of VBA to C# to find a record in the...
2
by: md110 | last post by:
i have 2 cell in my datagridview (cell1 and cell2) and 2 field in mytable (cust_id and cust_name) when insert value in first cell(cell1) search in mytbl and show (cust_name)in secend cell...
0
by: KevLe | last post by:
I'm building a log search function in c# for a certain management app and would like some help on the design how to solve this, here is my solution (on paper) so far: The log files are saved to...
0
by: hydro123 | last post by:
I am using VC++2008 and am trying to read data enetered in unbound datagridview to implement in function. Under button_click event I entered the following: // initialize varaibles from...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.