Page 2 of 3

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 1:56 pm
by monoeagle
öhmm

what dependencies?

The xml files will be created if they don't exist and also the DIRs.

The projectfiles where on my Client at DIR: C:\Workbench\Projects\ViSiT_Final

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:13 pm
by jvierra
All of the files are empty.

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:17 pm
by monoeagle
I don't understand what dependencies on my client exist what is not in the export.
I can run the generated exe on another client an get the behaviour too.

rename zip to exe, there is a filter for exe files

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:29 pm
by jvierra
When I try to load the DGV I get nothing an no error. It is trying to load entries.xml and that file has no entries.
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <inhalt>
  4.  
  5.   <elements>
  6.  
  7.   </elements>
  8.  
  9. </inhalt>

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:37 pm
by monoeagle
At first the entries.xml is empty.

Over the testing menu it is possible to add entries in the first post are the screenshots attached.
The testmenu is just for testing if the functions works. Later the content will be automated.

xml with two entries:
  1. <?xml version="1.0" encoding="utf-8"?>
  2.  
  3. <inhalt>
  4.  
  5.   <elements>
  6.  
  7.     <Entry Number="1">
  8.  
  9.       <number>1</number>
  10.  
  11.       <typ>VM</typ>
  12.  
  13.       <baureihe>BR402</baureihe>
  14.  
  15.       <version_lokal>V17.22</version_lokal>
  16.  
  17.       <datum_lokal>12.10.2015</datum_lokal>
  18.  
  19.       <version_ablage>V17.22</version_ablage>
  20.  
  21.       <datum_ablage>12.10.2015</datum_ablage>
  22.  
  23.       <pfad_lokal>C:\VMs\VM\BR405_150921_XP</pfad_lokal>
  24.  
  25.       <pfad_ablage>Z:\VMs\VM\BR405_150921_XP</pfad_ablage>
  26.  
  27.       <hash_lokal>
  28.  
  29.       </hash_lokal>
  30.  
  31.       <hash_ablage>
  32.  
  33.       </hash_ablage>
  34.  
  35.     </Entry>
  36.  
  37.     <Entry Number="2">
  38.  
  39.       <number>1</number>
  40.  
  41.       <typ>VM</typ>
  42.  
  43.       <baureihe>BR402</baureihe>
  44.  
  45.       <version_lokal>V17.22</version_lokal>
  46.  
  47.       <datum_lokal>12.10.2015</datum_lokal>
  48.  
  49.       <version_ablage>V17.22</version_ablage>
  50.  
  51.       <datum_ablage>12.10.2015</datum_ablage>
  52.  
  53.       <pfad_lokal>C:\VMs\VM\BR405_150921_XP</pfad_lokal>
  54.  
  55.       <pfad_ablage>Z:\VMs\VM\BR405_150921_XP</pfad_ablage>
  56.  
  57.       <hash_lokal>
  58.  
  59.       </hash_lokal>
  60.  
  61.       <hash_ablage>
  62.  
  63.       </hash_ablage>
  64.  
  65.     </Entry>
  66.  
  67.   </elements>
  68.  
  69. </inhalt>

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:48 pm
by jvierra
So what is it that does not work? How do we make it ail?

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 2:53 pm
by jvierra
Well so far so good. I added entries and have a grid. How do I make it fail?

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 3:00 pm
by monoeagle
The fail is reproduced(as described in the threadstart with the screenshots) on my side with the following:

- empty xml
- add xml entry via testing menu
- fill the dgv with the xml

if I use this steps in a row I get the first row in the dgv where in every cell is just 1 char.
If I clean the dgv and reload the xml via the testing menu the dgv display is correct. if I remove the entries in the xml and add a new xml entry and will load this new try the first row is faulty.

I think the problem is on the xml side or a problem with the xml in the memory?

But the Stepfunktions of PSS always show me the correct values in the variables. ;(

I read about that this behaviour(just 1 char in a cell) will be there if DirtyStateChanged is used.
  1. $datagridview_main_CurrentCellDirtyStateChanged={
  2.  
  3.     if ($datagridview_main.IsCurrentCellDirty)
  4.  
  5.     {
  6.  
  7.         $datagridview_main.CommitEdit([System.Windows.Forms.DataGridViewDataErrorContexts]::Commit)
  8.  
  9.     }
  10.  
  11. }
But I got the same behaviour if I commend it out or delete it.

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 3:07 pm
by jvierra
I have not recreated you issue. How many rows is "fill the DGV"?

Re: datagridview goes crazy

Posted: Thu Jan 28, 2016 3:09 pm
by monoeagle
step 4 result - WRONG VIEW.png
step 4 result - WRONG VIEW.png (12.17 KiB) Viewed 1325 times
fill the dgv is 1 row enough. But if you have entries in the xml you have to delete the entries in the xml manually, because at the moment I don't have the del function for the xml file in the testing menu.

Did you see the screenshot from the beginning with the 1 char in every field?