|
@@ -903,14 +903,7 @@ public class DynamicGridTreeUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
|
|
|
foreach (var row in data.Rows)
|
|
|
{
|
|
|
var newRow = _innerTable.NewRow();
|
|
|
- newRow.LoadValues(row.Values);
|
|
|
-
|
|
|
- for (var i = 0; i < ActionColumns.Count; i++)
|
|
|
- {
|
|
|
- var ac = ActionColumns[i];
|
|
|
- newRow[$"_ActionColumn{i}"] = ac.Data(row);
|
|
|
- }
|
|
|
-
|
|
|
+ ProcessRow(newRow, row);
|
|
|
_innerTable.Rows.Add(newRow);
|
|
|
|
|
|
var _id = row.Get<Guid>(IDColumn.Property);
|
|
@@ -926,6 +919,17 @@ public class DynamicGridTreeUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
|
|
|
UpdateRecordCount();
|
|
|
}
|
|
|
|
|
|
+ private void ProcessRow(CoreRow innerRow, CoreRow row)
|
|
|
+ {
|
|
|
+ innerRow.LoadValues(row.Values);
|
|
|
+
|
|
|
+ for (var i = 0; i < ActionColumns.Count; i++)
|
|
|
+ {
|
|
|
+ var ac = ActionColumns[i];
|
|
|
+ innerRow[$"_ActionColumn{i}"] = ac.Data(row);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
private void CalculateRowHeight()
|
|
|
{
|
|
|
if(Parent.Data != null && Parent.Data.Rows.Count > 0)
|
|
@@ -983,11 +987,10 @@ public class DynamicGridTreeUIComponent<T> : IDynamicGridUIComponent<T>, IDynami
|
|
|
if (_innerTable is null || row.Index < 0 || row.Index >= _innerTable.Rows.Count) return;
|
|
|
|
|
|
var _innerRow = _innerTable.Rows[row.Index];
|
|
|
+ ProcessRow(_innerRow, row);
|
|
|
+
|
|
|
var coreTreeNode = Nodes.Find(_innerRow);
|
|
|
- if(coreTreeNode is not null)
|
|
|
- {
|
|
|
- coreTreeNode.InvalidateData();
|
|
|
- }
|
|
|
+ coreTreeNode?.InvalidateData();
|
|
|
}
|
|
|
|
|
|
|