Support Forums

datagridview goes crazy

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.
User avatar
monoeagle
Posts: 94
Joined: Tue Oct 13, 2015 9:10 am

datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 12:38 pm

Product, version and build: Powershell Studio 2015 4.2.99
32 or 64 bit version of product: x64
Operating system: Win7
32 or 64 bit OS: x64

Hi,

at first I don't know for sure if it is correct here, but at the moment I think so.

In the last days I implemented some functions for XML and other stuff for a little utility.

Today I don't know why the Datagridview(dgv) got faulty.

Step 0: empty XML
Step 1: add xml entry --> works
Step 2: XML with 1 entry (correct)
Step 3: click do fill the dgv
Step 4: faulty view <---- here is the problem, why?
Step 5: repeat Step 1 and 3 - XML with 2 entries (correct)
Step 6: clear the dgv
Step 7: dgv clear
Step 8: repeat Step 3

The data which is used for the fields in the dgv are for all entries identically.

One event($datagridview_main_CurrentCellDirtyStateChanged) exist, but I have the same behaviour if I comment it or delete it.

If I step throw the source all variables have the equal value at the specific field.

New try:
- fresh start
- 3 times Step 1
- 1 times Step 3

Result: new try picture

New try:
- in the xml file are now entries
- fresh start
- 1 times Step 1
- 1 times Step 3

No view problem all entries are displayed correctly.

New try:
- remove the entry entries in the xml file
- fresh start
- add xml entry
- add xml to dgv
- same faulty display like at the beginning

;( ;(

In the Attachment are the pictures and a txt file with the 2 functions which I use.

Any idea/hints how I can catch the problem?

If you need something else feel free to ask.

regards
monoeagle
Attachments
20160128.zip
(163.34 KiB) Downloaded 60 times
Last edited by monoeagle on Thu Jan 28, 2016 4:07 pm, edited 3 times in total.
User avatar
DevinL
Site Admin
Posts: 731
Joined: Mon Aug 17, 2015 2:25 pm

Re: datagridview goes crazy

Postby DevinL » Thu Jan 28, 2016 12:46 pm

[POST MOVED TO POWERSHELL GUI FORUM BY MODERATOR]
DevinL
SAPIEN Technologies, Inc.
User avatar
DevinL
Site Admin
Posts: 731
Joined: Mon Aug 17, 2015 2:25 pm

Re: datagridview goes crazy

Postby DevinL » Thu Jan 28, 2016 12:47 pm

I moved this post to the GUI forum so others can chime in if they have a possible answer. Are you able to upload a *.psf instead of the text files and images? It would make it much easier to point you in the right direction.
DevinL
SAPIEN Technologies, Inc.
User avatar
jvierra
Posts: 10021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 12:59 pm

Zip the whole project folder.
User avatar
monoeagle
Posts: 94
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 1:06 pm

I have added the project. Maybe a lot of newbie/noob stuff, but be forbearing. :|
User avatar
jvierra
Posts: 10021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 1:22 pm

Unable to load ViSiT_Final.psproj (Project Format: v1.1), because it was created with a different version of PowerShell Studio 2015.
User avatar
jvierra
Posts: 10021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 1:24 pm

You named a file "System.Xml.XmlDocument" which is the formal name of a class. You probably should not do this.
User avatar
jvierra
Posts: 10021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 1:30 pm

Well it cannot be run without the project and the project file format is too old to load.

When mainform is run it ties to load the grid but no XML has been defined so it just quits.
User avatar
monoeagle
Posts: 94
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 1:43 pm

Hi Jvierra,

I exported the project.

In the filestructure are some skeletons, like the file named "System.Xml.XmlDocument".
Last edited by monoeagle on Thu Jan 28, 2016 4:07 pm, edited 1 time in total.
User avatar
jvierra
Posts: 10021
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 1:52 pm

It doesn't matter. It cannot be run because of all of the dependencies on you system. It will only run on your computer.

I was able to play some tricks and get the project to load but the data is in the wrong place and so all files come up empty/

Return to “PowerShell GUIs”

Who is online

Users browsing this forum: No registered users and 1 guest

cron