Hello,
Some months ago I got very good help from this forum, about WPF. (I couldn't find WPF forum then I posted here)
I have this DataGrid inside a Window, that I want to use to edit rows that have a previous value, there are 2 cells string, for a data and a number.
<DataGrid Name="TelsGrid" Grid.Column="3" Grid.Row="3" Grid.ColumnSpan="8" Width="320" Height="160"
ColumnHeaderHeight="36" RowHeight="36" RowHeaderWidth="36" HorizontalAlignment="Left"
VerticalScrollBarVisibility="Visible" FontSize="18" AutoGenerateColumns="False"
EnableRowVirtualization="True" CanUserAddRows="True" CanUserDeleteRows="True"
SelectionMode="Single" SelectionUnit="CellOrRowHeader" GridLinesVisibility="All"
BeginningEdit="OnBeginEdit" IsReadOnly="False">
<DataGrid.Columns>
<DataGridTextColumn Header="Título" Width="100">
</DataGridTextColumn>
<DataGridTextColumn Header="Nro. de Tel." Width="220">
</DataGridTextColumn>
</DataGrid.Columns>
</DataGrid>
I want to fill that with this code (the previous values), that is inside a method, there are no compiler error at any place.
foreach (TelData data in obj.Tels.PhoneNbrs)
{
TelsGrid.Items.Add(new object[] { data.Title, data.Number });
}
And in runtime I see the rows (Items) are added, but there is no text in the cells nor can I edit them, those are the 2 problems.
Thank you in advance for your help
Regards
Pablo