| | |
Highlight the data in the DataGrid when it is searched...
Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
![]() |
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 |
.net access algorithm angle array asp.net bitmap box broadcast c# capturing check checkbox client combobox control conversion csharp database databasesearch datagrid datagridview dataset datetime dbconnection degrees delegate design development disappear draganddrop drawing encryption enum eventhandlers excel file firefox form format forms function gdi+ grantorrevokepermissionthroughc#.net image input install interface java libraries list loop marshalbyrefobject math monodevelop mouseclick movingimage msword mysql operator path pause photoshop php picturebox pixelinversion platform post programming radians regex remoting richtextbox server sleep socket sql statistics string study system.servicemodel table tcpclientchannel text textbox thread time timer update usb usercontrol validation virtualization visualbasic visualstudio webbrowser winforms wpf wpfc# xml





