Creating a searchbox

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
sekou2331
Posts: 318
Last visit: Sat Oct 28, 2023 7:46 am

Creating a searchbox

Post by sekou2331 »

Hi,

I want to create a search box in winforms but i don't know how to even start to do this as I have never done it before. I want it to work with gridview. It actually already works with gridview when you do the below. I just want know how to create the below. If you look at the pic there is a filter which i believe acts like a search. How can I create the same thing in winforms in Powershell Studio?
  1. get-process | Out-GridView
Attachments
2017-01-13 20_48_13-get-process _ Out-GridView.png
2017-01-13 20_48_13-get-process _ Out-GridView.png (111.21 KiB) Viewed 14654 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Creating a searchbox

Post by jvierra »

You would use a data table to load the grid then use the "RowFilter" property of the data table's DataView.

Search toe web for examples of your request.

Here is one of many examples: viewtopic.php?t=6887
This topic is 7 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked