Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

VisualCobol: Populate WPF DataGrid

$
0
0

Hello, I am new to the Visual (Cobol) / WPF World (coming from ACU-Cobol).

I tried to find a Sample that demonstrates how to fill a WPF DataGrid (NOT DataGridView!!) from a file. I tested 2 different ways to populate the DG but None of them worked - here are them:

1.

- read a file called "VER01" (employees)
- filling a list with the Name, shortname and the number
- read next entry of file - filling list ...
- set the list (LISTBOX) to ItemsSource of Datagrid (LB1)
- DataGrid is empty although the List is filled correctly

Code

2.

- read file called "VER01" (employees)
- fill a Single-line-Array (LB1X) with entries from VER01 and
- directly try to add this line to the DataGrit (Invoke LB1::Items::Add(LB1X)
- The DataGrid is populatetd with the correct number of rows (concerning to the entries in the file) but the DataGrid has no content

Code

I really tried to find samles/help in the documentation, Forums, wikis, Google but could not find something that helps ... can anyone help please?

THX kathrin


Viewing all articles
Browse latest Browse all 4356

Trending Articles