Hello,
here the full GetCount() Method:
private int VM_GetCount(NodeBase sender)
{
if (sender is VirtualRootNode)
{
try
{
return DataTableProvider.Instance.GetDataTable().Rows.Count;
}
catch(Exception ex)
{
Siemens.Diagnostics.Trace.WriteLine(\"Error while trying to get count for datatable: \" + ex, \"JournalView\");
}
}
if (sender.Parent is VirtualRootNode)
{
try
{
return DataTableProvider.Instance.GetPeriodTableByIndex(sender.Index).Rows.Count;
}
catch (Exception ex)
{
Siemens.Diagnostics.Trace.WriteLine(\"Error while trying to get count for datetable: \" + ex, \"JournalView\");
}
}
return 0;
}