Support Forums

Search found 10191 matches

by jvierra
Thu Jan 19, 2017 2:06 pm
Forum: Windows PowerShell
Topic: Cant color datagridview
Replies: 6
Views: 73

Re: Cant color datagridview

Enable full row select. Be sure that the row is selected.

You cannot change a row cell color by changing the default. You have to change the cell color.
by jvierra
Thu Jan 19, 2017 10:56 am
Forum: Windows PowerShell
Topic: Cant color datagridview
Replies: 6
Views: 73

Re: Cant color datagridview

You have to set the color of each cell in the row by setting the Style.BackColor property.
by jvierra
Wed Jan 18, 2017 3:54 pm
Forum: Windows PowerShell
Topic: Textbox search for datagridview
Replies: 5
Views: 101

Re: Textbox search for datagridview

$datagridview1_CellClick=[System.Windows.Forms.DataGridViewCellEventHandler]{ #Event Argument: $_ = [System.Windows.Forms.DataGridViewCellEventArgs] $msg=@" You clicked on ROW: $($_.RowIndex) at COLUMN: $($_.ColumnIndex) with VALUE: $($datagridview1.Rows[$_.RowIndex].Cells[...
by jvierra
Wed Jan 18, 2017 2:06 pm
Forum: Windows PowerShell
Topic: Textbox search for datagridview
Replies: 5
Views: 101

Re: Textbox search for datagridview

You asked how to filter the grid. You are just re=getting the users. The method you invented doesn't seem to have anything to do with the question.
by jvierra
Wed Jan 18, 2017 11:54 am
Forum: Windows PowerShell
Topic: Textbox search for datagridview
Replies: 5
Views: 101

Re: Textbox search for datagridview

You need to use a data table for the grid then use the RowFilter property of the DefaultDataView on the datatable.

$datagrid1.DataSource.DefaultView.RowFilter = " Name LIKE 'joe*'"

Attached is an old example:
by jvierra
Wed Jan 18, 2017 11:42 am
Forum: PowerShell GUIs
Topic: Adding buttons to DataGridView Column cells
Replies: 11
Views: 79

Re: Adding buttons to DataGridView Column cells

The cell is a container. You have to get th control inside the container and alter that.
by jvierra
Wed Jan 18, 2017 10:25 am
Forum: PowerShell GUIs
Topic: Adding buttons to DataGridView Column cells
Replies: 11
Views: 79

Re: Adding buttons to DataGridView Column cells

Yep I get what you mean now. Unfortunately I get very little chance to do anything like this, and so almost have to start from scratch each time. Another option I'm looking at is to use the datagridviewimagecolumn and when a cell is that column is clicked change the background color or similar, the...
by jvierra
Wed Jan 18, 2017 10:15 am
Forum: PowerShell GUIs
Topic: Adding buttons to DataGridView Column cells
Replies: 11
Views: 79

Re: Adding buttons to DataGridView Column cells

I recommend reading the blog posts here on using forms. You seem to be missing most or teh design fundamentals. There is a post on context menus here: http://info.sapien.com/index.php/guis/gui-scripting You will find many articles on ways to sex up a form including fade-outs and animations. Once you...
by jvierra
Wed Jan 18, 2017 10:03 am
Forum: PowerShell GUIs
Topic: Adding buttons to DataGridView Column cells
Replies: 11
Views: 79

Re: Adding buttons to DataGridView Column cells

You can't. In this situation we would use a context menu. You can also use a checkbox and arrange pretty buttons next to the grid that operate on selected rows.

Go to advanced search