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: 92
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

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

ö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
User avatar
jvierra
Posts: 9738
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 2:13 pm

All of the files are empty.
User avatar
monoeagle
Posts: 92
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 2:17 pm

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
Last edited by monoeagle on Thu Jan 28, 2016 4:07 pm, edited 1 time in total.
User avatar
jvierra
Posts: 9738
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 2:29 pm

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.
<?xml version="1.0" encoding="utf-8"?>
<inhalt>
<elements>
</elements>
</inhalt>
User avatar
monoeagle
Posts: 92
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 2:37 pm

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:

<?xml version="1.0" encoding="utf-8"?>
<inhalt>
<elements>
<Entry Number="1">
<number>1</number>
<typ>VM</typ>
<baureihe>BR402</baureihe>
<version_lokal>V17.22</version_lokal>
<datum_lokal>12.10.2015</datum_lokal>
<version_ablage>V17.22</version_ablage>
<datum_ablage>12.10.2015</datum_ablage>
<pfad_lokal>C:\VMs\VM\BR405_150921_XP</pfad_lokal>
<pfad_ablage>Z:\VMs\VM\BR405_150921_XP</pfad_ablage>
<hash_lokal>
</hash_lokal>
<hash_ablage>
</hash_ablage>
</Entry>
<Entry Number="2">
<number>1</number>
<typ>VM</typ>
<baureihe>BR402</baureihe>
<version_lokal>V17.22</version_lokal>
<datum_lokal>12.10.2015</datum_lokal>
<version_ablage>V17.22</version_ablage>
<datum_ablage>12.10.2015</datum_ablage>
<pfad_lokal>C:\VMs\VM\BR405_150921_XP</pfad_lokal>
<pfad_ablage>Z:\VMs\VM\BR405_150921_XP</pfad_ablage>
<hash_lokal>
</hash_lokal>
<hash_ablage>
</hash_ablage>
</Entry>
</elements>
</inhalt>
User avatar
jvierra
Posts: 9738
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 2:48 pm

So what is it that does not work? How do we make it ail?
User avatar
jvierra
Posts: 9738
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 2:53 pm

Well so far so good. I added entries and have a grid. How do I make it fail?
User avatar
monoeagle
Posts: 92
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 3:00 pm

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.

$datagridview_main_CurrentCellDirtyStateChanged={
if ($datagridview_main.IsCurrentCellDirty)
{
$datagridview_main.CommitEdit([System.Windows.Forms.DataGridViewDataErrorContexts]::Commit)
}
}


But I got the same behaviour if I commend it out or delete it.
User avatar
jvierra
Posts: 9738
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: datagridview goes crazy

Postby jvierra » Thu Jan 28, 2016 3:07 pm

I have not recreated you issue. How many rows is "fill the DGV"?
User avatar
monoeagle
Posts: 92
Joined: Tue Oct 13, 2015 9:10 am

Re: datagridview goes crazy

Postby monoeagle » Thu Jan 28, 2016 3:09 pm

step 4 result - WRONG VIEW.png
step 4 result - WRONG VIEW.png (12.17 KiB) Viewed 793 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?

Return to “PowerShell GUIs”

Who is online

Users browsing this forum: No registered users and 3 guests