![]() |
|
[.NET] Search listview for dates within a range - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] Search listview for dates within a range (/showthread.php?tid=5625858) |
Search listview for dates within a range - PriorityNew - May 18, 2017 Hi, I'm really stuck and I've been trying what seems like forever to search a listview by date (dd/mm/yy) to grab rows of data and move certain columns to a listview2. Can anyone help? Thanks * - Ninja - May 18, 2017 So you want to get listviewitems that hold a certain datetime value to be moved to another listview? If so, just loop over the listview items, and apply a condition. * - PriorityNew - May 18, 2017 (May 18, 2017 06:52 AM)Ninja Wrote: So you want to get listviewitems that hold a certain datetime value to be moved to another listview? I want to get any dates in a listview that are within a range of two dates entered by the user. If the a date is within the two dates then it will grab other records on that row and move them too a listview2 * - Ninja - May 18, 2017 (May 18, 2017 07:01 AM)PriorityNew Wrote: I want to get any dates in a listview that are within a range of two dates entered by the user. If the a date is within the two dates then it will grab other records on that row and move them too a listview2 Familiarize yourself with foreach loops. * - Milch1 - May 18, 2017 Forget the word "listview" if you are programming. Listview is GUI it is for users only. You have to think about the databinding of the listview. The question is, is it binded with a datatable, with a list (of t) or something else. If the listview is not binded, then cast it to a list, sort the list (by date), filter the list (with the dates), bind the list with the listview2. |