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.

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 8 years and 1 month 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
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

datagridview goes crazy

Post by monoeagle »

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 180 times
Last edited by monoeagle on Thu Jan 28, 2016 3:07 pm, edited 3 times in total.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: datagridview goes crazy

Post by DevinL »

[POST MOVED TO POWERSHELL GUI FORUM BY MODERATOR]
DevinL
SAPIEN Technologies, Inc.
DevinL
Posts: 1098
Last visit: Tue Jun 06, 2017 9:15 am

Re: datagridview goes crazy

Post by DevinL »

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.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagridview goes crazy

Post by jvierra »

Zip the whole project folder.
User avatar
monoeagle
Posts: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: datagridview goes crazy

Post by monoeagle »

I have added the project. Maybe a lot of newbie/noob stuff, but be forbearing. :|
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagridview goes crazy

Post by jvierra »

Unable to load ViSiT_Final.psproj (Project Format: v1.1), because it was created with a different version of PowerShell Studio 2015.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagridview goes crazy

Post by jvierra »

You named a file "System.Xml.XmlDocument" which is the formal name of a class. You probably should not do this.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagridview goes crazy

Post by jvierra »

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: 108
Last visit: Fri Jan 26, 2024 10:44 am

Re: datagridview goes crazy

Post by monoeagle »

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 3:07 pm, edited 1 time in total.
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: datagridview goes crazy

Post by jvierra »

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/
This topic is 8 years and 1 month 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