Support Forums

We are taking time during the holiday to perform our annual site maintenance from Dec. 21, 2018, 9:00 a.m. to Dec. 22, 2018, 9:00 a.m. (PST).All SAPIEN services will be offline during this maintenance period, including the SAPIEN website, Community Support Forums, Premium Support Ticketing, SAPIEN Blog, SAPIEN Store, and License Activation. We appreciate your patience and understanding.

I want to clear the columns in a datagridview without closing the form. I tried many many ways with no success. This should be easy to do but it wasn't. I do not have a datasource as you will see in the sample code.

I tried both the $dataGridView.DataSource = [System.Collections.Array]$motorStats and this worked. However the $dataGridView.Rows.Clear() and also the $dataGridView.DataSource = $null did not clear the table. I should note I did not use a datagridview object from the powershell studio toolbox. Here is the code presently with the clear and nulls removed:

MotorOperation returns an entire table to be displayed in the grid. The combobox selection directs which motor operation is to be analyzed and send the appropriate parameters to the function. The function is working correctly and does not need to be changed. It is just that everytime a new motor is selected the table should be cleared and re-created with whatever is returned by the MotorOperation function. The MotorOperation function works correctly. The only thing that is funky is the grid and the ability to clear it on demand. I like the datasource. That works for me. When I tried to create a datasource object with the gui, it would not let me add the data source in the gui. I suspect I would have to define that in my application.