| | |
Highlight the data in the DataGrid when it is searched...
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
the problem is this: Example I have five data in the datagrid(of course the data comes from the database.) and I want row of the datagrid to be highligted when the the data was found after searching it...
If I have five rows and the data was found in the 3rd row, the 3rd row must be highlighted...remember all five rows must always visible when it was search, therefor in searching the data you must not use the keyword LIKE.
Hope you get my point...
thanks!
If I have five rows and the data was found in the 3rd row, the 3rd row must be highlighted...remember all five rows must always visible when it was search, therefor in searching the data you must not use the keyword LIKE.
Hope you get my point...
thanks!
A conclusion is the place where you got tired of thinking. http://www.martin2k.co.uk/forums/index.php?showforum=4
http://www.a1vbcode.com/a1vbcode/vbforums/Forum3-1.aspx
http://www.developerfusion.co.uk/for...orum&ForumID=4
Hi
I am not sure if i understand completely but here: if you are trying to find an specific record on a data table the easiest way (for me) is to filter the table or dataview with the specified criteria. If you want the datagrid to show the rows (records) all the time then create a copy of the datatable or the dataview the datagrid is using as datasource or just freeze the screen while filtering; after that, just look for the record number and select the correct row in the datagrid.
The other option is to loop thru the rows in the datagrid itself and compare the data in the row with the desired data and when found then select the row.
hope it helps.
I am not sure if i understand completely but here: if you are trying to find an specific record on a data table the easiest way (for me) is to filter the table or dataview with the specified criteria. If you want the datagrid to show the rows (records) all the time then create a copy of the datatable or the dataview the datagrid is using as datasource or just freeze the screen while filtering; after that, just look for the record number and select the correct row in the datagrid.
The other option is to loop thru the rows in the datagrid itself and compare the data in the row with the desired data and when found then select the row.
hope it helps.
![]() |
Other Threads in the C# Forum
- Previous Thread: C#
- Next Thread: populate two dropdownlist
| Thread Tools | Search this Thread |
Tag cloud for C#
.net access algorithm array barchart bitmap box buttons c# chat check checkbox class client color combobox control conversion csharp custom database datagrid datagridview dataset datetime degrees draganddrop drawing encryption enum event excel file files form format forms ftp function gdi+ httpwebrequest image index input install java label list listbox listener login mandelbrot math mouseclick mysql networking object operator oracle path photoshop picturebox pixelinversion post prime programming radians regex remote remoting resource richtextbox save saving serialization server sleep socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





