Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Sorry. My problem is with WPF
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Example to select the object with the row values:
<DataGrid Name="DGWerte"
Margin="10,0,0,0"
AutoGenerateColumns="False"
CanUserAddRows="True"
CanUserDeleteRows="True"
CanUserReorderColumns="False"
CanUserSortColumns="True"
CanUserResizeColumns="True"
CanUserResizeRows="False"
IsSynchronizedWithCurrentItem="True"
SelectionMode="Single"
SelectionUnit="FullRow"
GridLinesVisibility="All"
ToolTip="Tooltip: Delete löscht Zeile"
SelectionChanged="DGWerte_SelectionChanged"
CellEditEnding="DGWerte_CellEditEnding"
Background="White">
<DataGrid.Columns>
….
method-id DGWerte_CellEditEnding.
procedure division using by value sender as object e as type System.Windows.Controls.DataGridCellEditEndingEventArgs.
if DGWerte::SelectedIndex >= 0
set GridZeile to DGWerte::Items::CurrentItem as type WPFApplDataGrid.GridZeile
end-if.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Thanks for your answer bau my problem is not receive the data selected.
I try to make an example of a gridview contain the invoices of a client. It's OK.
Now i want to expand the gridview to see (inside the grig view) the lines of the invoice.
I can see the header of the details but i can't see the lines.
I don't know how i can send you a print to explain wath i want to do.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
I have attached a real simple example of using a dataGrid with a rowsDetailTemplate that works for me.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Thanks for the example. It is the simplest to load the data in the datagrid that I saw.
I get the programming scheme.
Now what I was trying to do that but with multiple detail lines for each customer.
The better I got to explain is what's in Figure 8 this link
www.linhadecodigo.com.br/.../usando-a-datagrid-wpf.aspx
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
The multiple row approach appears to be done by embedding a second grid within the RowsDetailTemplate. I will work on modifying the example I gave to you to support this.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Ok. Thanks for your help.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Here is an updated sample that has added a second grid as part of the details on the rows of the first grid. I just created a list containing the data as a new property of the same object that I was binding. In a real application you would most likely get this data from a file or database as a DataSet object and bind directly to that.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
It's perfect and work well.
Thanks again.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Just more one thing:
In your example I added a column with the value of each order (it's ok).
I tried to use the STRINGFORMAT = N02 (or another) but appears always the same (without any format).
You can use your last example and apply the StringFormat?
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Have a look to my solution
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Version with OrderDate as DateTime and OrderValue as decimal. So sorting works well.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
It's perfect. I've adapted to my solution and everything is working.
Now I just couldn't do the same thing in a TextBox.
I have to have the function of Binding also in this field?
Or in which property is to put the function of StringFormat
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
The formatting is a property of the column itself and not a property of the data that is being bound to it.
Can you please tell us exactly what is it that you wish to accomplish?
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
The question is:
In the field of the data grid i have this (like the example you send):
<DataGridTextColumn Binding="{Binding VALCR, StringFormat=C, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}, Mode=OneWay}" ClipboardContentBinding="{x:Null}" Header="Valor a Crédito" SortDirection="Ascending" CanUserResize="False" FontSize="14" Width="150" SortMemberPath="VALCR">
It´s work fine and result is the result i want.
Now wath is the instruction to put the STRINGFORMAT in a Text Box field.
For example:
<TextBox x:Name="txtTtdeb" HorizontalAlignment="Left" Height="30" Margin="790,580,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" FontSize="14" FontWeight="Normal" HorizontalContentAlignment="Right" IsReadOnly="True"/>
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
This is my solution with Binding:
<TextBlock Text="{Binding TotBetrag, StringFormat=N02, ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}" Margin="10,0,0,0" VerticalAlignment="Center" MinWidth="5"></TextBlock>
'TotBetrag' is a property in a ModelClass. (set self::DataContext to model.)
Setting text property as Cobol code:
set textBox2::Text to DecimalValue2::ToString("N2")
Werner Lanter
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
I tried to use the two forms and the two had problems.
Binding: I think I'm missing something because I created the class and made the set:D ataContext self: to model. The DataContext has the correct value but in the field of the screen does not show anything.
In cobol: experienced alternately in this way (which makes me way more) but on the screen appear two more decimal places.
I have set txtTtdeb:: Text to WRK-VLXDB:: ToString (C) "where WRK-VLXDB is a PIC 9 (6) V99.
For example: WRK-VLXDB = 15.70.
On the screen appears 1570.00 €
What am I doing wrong?
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
PIC 9(6)V99 is not a decimal type in .Net. Try following statement:
set txtTtdeb::Text to (WRK-VLXDB as decimal)::ToString("C2")
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Yes, now it's working.
Thanks very much.
For now I have one more question:
How do you pass the value of a TEXTBOX to a numeric field?
Have the statement "set bcl-desc1 to fldDesc1:: Text" where BCL-DESC1 is a discount field) 99V99 PIC.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Try something like:
if not type Decimal::TryParse(fldDescr1::Text, BCL-DESC)
*> invalid numeric data
move 0 to BCL-DESC
end-if
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
If you are using WPF Data Binding .Net does the conversion. If you have a numeric or decimal field type and the value entered is not numeric, then WPF Binding marks the textbox with a read border. I recommend to use .Net field types for all binding properties, even though Cobol does some conversions automatically, like in the example of Chris.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Chris: thanks for the answer: it's work fine.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
Thanks again for the topics. My project will evolve with your fantastic help.
Can you send me a small example using the .Net Data Binding with WPF?
I'm using a MySql database and I'm reading the data for cobol fields and that's why I'm having these problems.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
There are a number of examples in our knowledgebase that show how you can use EXEC SQL statements and bind to WPF.
One such example is here:
To search our knowledgebase for useful articles and samples simply go to the search box on the top right of this page (magnifying glass) click on the drop-down and select Visual COBOL. Then enter in your search string such as bind and press enter.
You will be presented with a list of matching articles.
Thanks.
Hello
I'm trying to see the details of the invoices when I select the line of one of them.
For this I created a datagrid with invoices.
After I added a DataGrid.rowdetailstemplate where i define the fields i want to appear when I select an invoice.
When I select one of them with the header line appears but the invoice lines do not appear.
I've tried several ways and I can't get them to appear.
I don't know exactly when and how you have to load the information of the details.
Can someone help me?
Thank you.
I upload a new version of your solution ‘testgriddetails’ enhanced with a Model Class with the interface ‘INotifyPropertyChanged’. You can do your database processing within the model class.