or
<ControlTemplate x:Key="OtherWorkEditTemplate">
<Grid x:Name="LayoutRoot">
<GroupBox Header="Something" BorderBrush="{DynamicResource SolidColorBlueBrush}">
<Grid>
...
<telerik:RadDatePicker SelectedValue="{Binding OtherWork.InvoiceDate}" VerticalAlignment="Top" Margin="88.787,98.458,8,0" DateTimeWatermarkContent="Enter" telerik:StyleManager.Theme="Metro" />
</Grid>
</GroupBox>
</Grid>
</ControlTemplate>
How can i solve this?
Thanks a lot,
Attila

public DataTable CurrentDataTable { get { return dataGridView.ItemsSource != null ? ((BindingSource) dataGridView.ItemsSource).DataSource as DataTable : null; } set { CurrentSelectedTableName = value.TableName; //BindingSource to sync DataTable and DataGridView var bSource = new BindingSource {DataSource = value}; //set the DataGridView DataSource dataGridView.DataContext = bSource; } }public void LoadExtraRow() { var itemSourceDataTable = CurrentDataTable; if (itemSourceDataTable == null) return; var newRow = itemSourceDataTable.NewRow(); newRow.RowError = "NEW_ROW"; itemSourceDataTable.Rows.Add(newRow); dataGridView.Rebind(); } public void UnloadExtraRow(){ var itemSourceDataTable = CurrentDataTable; if (itemSourceDataTable == null) return; if (itemSourceDataTable.Rows.Count > 0) { var emptyRowToRemove = itemSourceDataTable.Rows[itemSourceDataTable.Rows.Count - 1]; if (emptyRowToRemove.RowError == "NEW_ROW") { itemSourceDataTable.Rows.Remove(emptyRowToRemove); } } }