473,511 Members | 15,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

search for a value in a Datagridview

42 New Member
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 13933
semomaniz
210 Recognized Expert New Member
Please show us what exactly you have done so far.
Apr 9 '10 #2
sweetneel
42 New Member
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 Recognized Expert New Member
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
6736
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
3561
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
2250
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
8610
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
18904
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
4101
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
2050
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
1400
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
1070
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
5239
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...
0
7245
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7356
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7512
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5069
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
4741
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3227
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1577
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
449
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.