ElementDataGridRow.cpp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701
  1. /*
  2. * This source file is part of RmlUi, the HTML/CSS Interface Middleware
  3. *
  4. * For the latest information, see http://github.com/mikke89/RmlUi
  5. *
  6. * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
  7. * Copyright (c) 2019 The RmlUi Team, and contributors
  8. *
  9. * Permission is hereby granted, free of charge, to any person obtaining a copy
  10. * of this software and associated documentation files (the "Software"), to deal
  11. * in the Software without restriction, including without limitation the rights
  12. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  13. * copies of the Software, and to permit persons to whom the Software is
  14. * furnished to do so, subject to the following conditions:
  15. *
  16. * The above copyright notice and this permission notice shall be included in
  17. * all copies or substantial portions of the Software.
  18. *
  19. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  20. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  21. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  22. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  23. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  24. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  25. * THE SOFTWARE.
  26. *
  27. */
  28. #include "../../Include/RmlUi/Controls/ElementDataGridRow.h"
  29. #include "../../Include/RmlUi/Core.h"
  30. #include "../../Include/RmlUi/Controls/DataSource.h"
  31. #include "../../Include/RmlUi/Controls/DataFormatter.h"
  32. #include "../../Include/RmlUi/Controls/ElementDataGrid.h"
  33. #include "../../Include/RmlUi/Controls/ElementDataGridCell.h"
  34. #include "../Core/Clock.h"
  35. namespace Rml {
  36. namespace Controls {
  37. static const float MAX_UPDATE_TIME = 0.001f;
  38. ElementDataGridRow::ElementDataGridRow(const Rml::Core::String& tag) : Core::Element(tag)
  39. {
  40. parent_grid = nullptr;
  41. parent_row = nullptr;
  42. child_index = -1;
  43. depth = -1;
  44. data_source = nullptr;
  45. table_relative_index = -1;
  46. table_relative_index_dirty = true;
  47. dirty_cells = true;
  48. dirty_children = false;
  49. row_expanded = true;
  50. SetProperty(Core::PropertyId::WhiteSpace, Core::Property(Core::Style::WhiteSpace::Nowrap));
  51. SetProperty(Core::PropertyId::Display, Core::Property(Core::Style::Display::InlineBlock));
  52. }
  53. ElementDataGridRow::~ElementDataGridRow()
  54. {
  55. if (data_source)
  56. {
  57. data_source->DetachListener(this);
  58. data_source = nullptr;
  59. }
  60. }
  61. void ElementDataGridRow::Initialise(ElementDataGrid* _parent_grid, ElementDataGridRow* _parent_row, int _child_index, ElementDataGridRow* header_row, int _depth)
  62. {
  63. parent_grid = _parent_grid;
  64. parent_row = _parent_row;
  65. child_index = _child_index;
  66. depth = _depth;
  67. // We start all the rows collapsed, except for the root row.
  68. if (child_index != -1)
  69. {
  70. row_expanded = false;
  71. }
  72. int num_columns = parent_grid->GetNumColumns();
  73. Rml::Core::XMLAttributes cell_attributes;
  74. for (int i = 0; i < num_columns; i++)
  75. {
  76. Core::ElementPtr element = Core::Factory::InstanceElement(this, "#rmlctl_datagridcell", "datagridcell", cell_attributes);
  77. ElementDataGridCell* cell = dynamic_cast< ElementDataGridCell* >(element.get());
  78. cell->Initialise(i, header_row->GetChild(i));
  79. cell->SetProperty(Core::PropertyId::Display, Core::Property(Core::Style::Display::InlineBlock));
  80. AppendChild(std::move(element));
  81. }
  82. }
  83. void ElementDataGridRow::SetChildIndex(int _child_index)
  84. {
  85. if (child_index != _child_index)
  86. {
  87. child_index = _child_index;
  88. if (parent_row)
  89. {
  90. parent_row->ChildChanged(child_index);
  91. }
  92. }
  93. }
  94. int ElementDataGridRow::GetDepth()
  95. {
  96. return depth;
  97. }
  98. void ElementDataGridRow::SetDataSource(const Rml::Core::String& data_source_name)
  99. {
  100. if (data_source != nullptr)
  101. {
  102. data_source->DetachListener(this);
  103. data_source = nullptr;
  104. }
  105. if (ParseDataSource(data_source, data_table, data_source_name))
  106. {
  107. data_source->AttachListener(this);
  108. RefreshRows();
  109. }
  110. }
  111. bool ElementDataGridRow::UpdateChildren()
  112. {
  113. if (dirty_children)
  114. {
  115. double start_time = Core::Clock::GetElapsedTime();
  116. RowQueue dirty_rows;
  117. dirty_rows.push(this);
  118. while (!dirty_rows.empty())
  119. {
  120. ElementDataGridRow* dirty_row = dirty_rows.front();
  121. dirty_rows.pop();
  122. float time_slice = MAX_UPDATE_TIME - float(Core::Clock::GetElapsedTime() - start_time);
  123. if (time_slice <= 0.0f)
  124. break;
  125. dirty_row->LoadChildren(time_slice);
  126. for (size_t i = 0; i < dirty_row->children.size(); i++)
  127. {
  128. if (dirty_row->children[i]->dirty_cells || dirty_row->children[i]->dirty_children)
  129. {
  130. dirty_rows.push(dirty_row->children[i]);
  131. }
  132. }
  133. }
  134. return true;
  135. }
  136. return false;
  137. }
  138. // Returns the number of children that aren't dirty (have been loaded)
  139. int ElementDataGridRow::GetNumLoadedChildren()
  140. {
  141. int num_loaded_children = 0;
  142. for (size_t i = 0; i < children.size(); i++)
  143. {
  144. if (!children[i]->dirty_cells)
  145. {
  146. num_loaded_children++;
  147. }
  148. num_loaded_children += children[i]->GetNumLoadedChildren();
  149. }
  150. return num_loaded_children;
  151. }
  152. bool ElementDataGridRow::IsRowExpanded()
  153. {
  154. return row_expanded;
  155. }
  156. void ElementDataGridRow::ExpandRow()
  157. {
  158. row_expanded = true;
  159. for (size_t i = 0; i < children.size(); i++)
  160. {
  161. children[i]->Show();
  162. }
  163. DirtyLayout();
  164. }
  165. void ElementDataGridRow::CollapseRow()
  166. {
  167. row_expanded = false;
  168. for (size_t i = 0; i < children.size(); i++)
  169. {
  170. children[i]->Hide();
  171. }
  172. DirtyLayout();
  173. }
  174. void ElementDataGridRow::ToggleRow()
  175. {
  176. if (row_expanded)
  177. {
  178. CollapseRow();
  179. }
  180. else
  181. {
  182. ExpandRow();
  183. }
  184. }
  185. // Returns the index of this row, relative to its parent.
  186. int ElementDataGridRow::GetParentRelativeIndex()
  187. {
  188. return child_index;
  189. }
  190. // Returns the index of this row, relative to the table rather than its parent.
  191. int ElementDataGridRow::GetTableRelativeIndex()
  192. {
  193. if (!parent_row)
  194. {
  195. return -1;
  196. }
  197. if (table_relative_index_dirty)
  198. {
  199. table_relative_index = parent_row->GetChildTableRelativeIndex(child_index);
  200. table_relative_index_dirty = false;
  201. }
  202. return table_relative_index;
  203. }
  204. // Returns the parent row of this row.
  205. ElementDataGridRow* ElementDataGridRow::GetParentRow()
  206. {
  207. return parent_row;
  208. }
  209. // Returns the grid that this row belongs to.
  210. ElementDataGrid* ElementDataGridRow::GetParentGrid()
  211. {
  212. return parent_grid;
  213. }
  214. void ElementDataGridRow::OnDataSourceDestroy(DataSource* RMLUI_UNUSED_PARAMETER(_data_source))
  215. {
  216. if(data_source != nullptr)
  217. {
  218. data_source->DetachListener(this);
  219. data_source = nullptr;
  220. }
  221. RemoveChildren();
  222. }
  223. void ElementDataGridRow::OnRowAdd(DataSource* _data_source, const Rml::Core::String& _data_table, int first_row_added, int num_rows_added)
  224. {
  225. if (_data_source == data_source && _data_table == data_table)
  226. AddChildren(first_row_added, num_rows_added);
  227. }
  228. void ElementDataGridRow::OnRowRemove(DataSource* _data_source, const Rml::Core::String& _data_table, int first_row_removed, int num_rows_removed)
  229. {
  230. if (_data_source == data_source && _data_table == data_table)
  231. RemoveChildren(first_row_removed, num_rows_removed);
  232. }
  233. void ElementDataGridRow::OnRowChange(DataSource* _data_source, const Rml::Core::String& _data_table, int first_row_changed, int num_rows_changed)
  234. {
  235. if (_data_source == data_source && _data_table == data_table)
  236. ChangeChildren(first_row_changed, num_rows_changed);
  237. }
  238. void ElementDataGridRow::OnRowChange(DataSource* _data_source, const Rml::Core::String& _data_table)
  239. {
  240. if (_data_source == data_source && _data_table == data_table)
  241. RefreshRows();
  242. }
  243. // Removes all the child cells and fetches them again from the data source.
  244. void ElementDataGridRow::RefreshRows()
  245. {
  246. // Remove all our child rows from the table.
  247. RemoveChildren();
  248. // Load the children from the data source.
  249. if (data_source != nullptr)
  250. {
  251. int num_rows = data_source->GetNumRows(data_table);
  252. if (num_rows > 0)
  253. {
  254. AddChildren(0, num_rows);
  255. }
  256. }
  257. }
  258. // Called when a row change (addition or removal) occurs in one of our
  259. // children.
  260. void ElementDataGridRow::ChildChanged(int child_row_index)
  261. {
  262. for (int i = child_row_index + 1; i < (int)children.size(); i++)
  263. {
  264. children[i]->DirtyTableRelativeIndex();
  265. }
  266. if (parent_row)
  267. {
  268. parent_row->ChildChanged(child_index);
  269. }
  270. }
  271. // Checks if any columns are dependent on the number of children present, and
  272. // refreshes them from the data source if they are.
  273. void ElementDataGridRow::RefreshChildDependentCells()
  274. {
  275. if (child_index != -1)
  276. {
  277. for (int i = 0; i < parent_grid->GetNumColumns(); i++)
  278. {
  279. const ElementDataGrid::Column* column = parent_grid->GetColumn(i);
  280. if (column->refresh_on_child_change)
  281. {
  282. DirtyCells();
  283. }
  284. }
  285. }
  286. }
  287. // Called whenever a row is added or removed above ours.
  288. void ElementDataGridRow::DirtyTableRelativeIndex()
  289. {
  290. if (table_relative_index_dirty)
  291. return;
  292. for (size_t i = 0; i < children.size(); i++)
  293. {
  294. children[i]->DirtyTableRelativeIndex();
  295. }
  296. table_relative_index_dirty = true;
  297. }
  298. int ElementDataGridRow::GetChildTableRelativeIndex(int child_index)
  299. {
  300. // We start with our index, then count down each of the children until we
  301. // reach child_index. For each child we skip by add one (for the child
  302. // itself) and all of its descendants.
  303. int child_table_index = GetTableRelativeIndex() + 1;
  304. for (int i = 0; i < child_index; i++)
  305. {
  306. child_table_index++;
  307. child_table_index += children[i]->GetNumDescendants();
  308. }
  309. return child_table_index;
  310. }
  311. // Adds children underneath this row, and fetches their contents (and possible
  312. // children) from the row's data source.
  313. void ElementDataGridRow::AddChildren(int first_row_added, int num_rows_added)
  314. {
  315. if (first_row_added == -1)
  316. {
  317. first_row_added = (int)children.size();
  318. }
  319. // We need to make a row for each new child, then pass through the cell
  320. // information and the child's data source (if one exists.)
  321. if (data_source != nullptr)
  322. {
  323. for (int i = 0; i < num_rows_added; i++)
  324. {
  325. int row_index = first_row_added + i;
  326. // Make a new row:
  327. ElementDataGridRow* new_row = parent_grid->AddRow(this, row_index);
  328. children.insert(children.begin() + row_index, new_row);
  329. if (!row_expanded)
  330. {
  331. new_row->SetProperty(Core::PropertyId::Display, Core::Property(Core::Style::Display::None));
  332. }
  333. }
  334. for (int i = first_row_added + num_rows_added; i < (int)children.size(); i++)
  335. {
  336. children[i]->SetChildIndex(i);
  337. children[i]->DirtyTableRelativeIndex();
  338. }
  339. if (parent_row)
  340. {
  341. parent_row->ChildChanged(child_index);
  342. }
  343. }
  344. RefreshChildDependentCells();
  345. DirtyRow();
  346. Rml::Core::Dictionary parameters;
  347. parameters["first_row_added"] = GetChildTableRelativeIndex(first_row_added);
  348. parameters["num_rows_added"] = num_rows_added;
  349. // @performance: Does anyone really use this?
  350. parent_grid->DispatchEvent(Core::EventId::Rowadd, parameters);
  351. }
  352. void ElementDataGridRow::RemoveChildren(int first_row_removed, int num_rows_removed)
  353. {
  354. if (num_rows_removed == -1)
  355. {
  356. num_rows_removed = (int)children.size() - first_row_removed;
  357. }
  358. // prevent relayout of the document while removing rows
  359. Core::ElementDocument* document = parent_grid->GetOwnerDocument();
  360. for (int i = num_rows_removed - 1; i >= 0; i--)
  361. {
  362. children[first_row_removed + i]->RemoveChildren();
  363. parent_grid->RemoveRows(children[first_row_removed + i]->GetTableRelativeIndex());
  364. }
  365. children.erase(children.begin() + first_row_removed, children.begin() + (first_row_removed + num_rows_removed));
  366. for (int i = first_row_removed; i < (int) children.size(); i++)
  367. {
  368. children[i]->SetChildIndex(i);
  369. children[i]->DirtyTableRelativeIndex();
  370. }
  371. Rml::Core::Dictionary parameters;
  372. parameters["first_row_removed"] = GetChildTableRelativeIndex(first_row_removed);
  373. parameters["num_rows_removed"] = num_rows_removed;
  374. // @performance: Does anyone really use this?
  375. parent_grid->DispatchEvent(Core::EventId::Rowremove, parameters);
  376. }
  377. void ElementDataGridRow::ChangeChildren(int first_row_changed, int num_rows_changed)
  378. {
  379. for (int i = first_row_changed; i < first_row_changed + num_rows_changed; i++)
  380. children[i]->DirtyCells();
  381. Rml::Core::Dictionary parameters;
  382. parameters["first_row_changed"] = GetChildTableRelativeIndex(first_row_changed);
  383. parameters["num_rows_changed"] = num_rows_changed;
  384. // @performance: Does anyone really use this?
  385. parent_grid->DispatchEvent(Core::EventId::Rowchange, parameters);
  386. }
  387. // Returns the number of rows under this row (children, grandchildren, etc)
  388. int ElementDataGridRow::GetNumDescendants()
  389. {
  390. int num_descendants = (int)children.size();
  391. for (size_t i = 0; i < children.size(); i++)
  392. num_descendants += children[i]->GetNumDescendants();
  393. return num_descendants;
  394. }
  395. // Adds the cell contents, and marks the row as loaded.
  396. void ElementDataGridRow::Load(const DataQuery& row_information)
  397. {
  398. // Check for a data source. If they're both set then we set
  399. // ourselves up with it.
  400. if (row_information.IsFieldSet(DataSource::CHILD_SOURCE))
  401. {
  402. Rml::Core::String data_source = row_information.Get< Rml::Core::String >(DataSource::CHILD_SOURCE, "");
  403. if (!data_source.empty())
  404. {
  405. SetDataSource(data_source);
  406. }
  407. else
  408. {
  409. // If we've no data source, then we should remove any children.
  410. RemoveChildren();
  411. }
  412. }
  413. // Now load our cells.
  414. for (int i = 0; i < parent_grid->GetNumColumns(); i++)
  415. {
  416. Core::Element* cell = GetChild(i);
  417. if (cell)
  418. {
  419. // Fetch the column:
  420. const ElementDataGrid::Column* column = parent_grid->GetColumn(i);
  421. // Now we use the column's formatter to process the raw data into the
  422. // XML string, and parse that into the actual Core::Elements. If there is
  423. // no formatter, then we just send through the raw text, in CVS form.
  424. Rml::Core::StringList raw_data;
  425. raw_data.reserve(column->fields.size());
  426. size_t raw_data_total_len = 0;
  427. for (size_t i = 0; i < column->fields.size(); i++)
  428. {
  429. if (column->fields[i] == DataSource::DEPTH)
  430. {
  431. raw_data.push_back(Rml::Core::CreateString(8, "%d", depth));
  432. raw_data_total_len += raw_data.back().length();
  433. }
  434. else if (column->fields[i] == DataSource::NUM_CHILDREN)
  435. {
  436. raw_data.push_back(Rml::Core::CreateString(8, "%d", children.size()));
  437. raw_data_total_len += raw_data.back().length();
  438. }
  439. else
  440. {
  441. raw_data.push_back(row_information.Get< Rml::Core::String >(column->fields[i], ""));
  442. raw_data_total_len += raw_data.back().length();
  443. }
  444. }
  445. Rml::Core::String cell_string;
  446. if (column->formatter)
  447. {
  448. column->formatter->FormatData(cell_string, raw_data);
  449. }
  450. else
  451. {
  452. cell_string.reserve(raw_data_total_len + raw_data.size() + 1);
  453. for (size_t i = 0; i < raw_data.size(); i++)
  454. {
  455. if (i > 0)
  456. {
  457. cell_string += ",";
  458. }
  459. cell_string += raw_data[i];
  460. }
  461. }
  462. // Remove all the cell's current contents.
  463. while (cell->GetNumChildren(true) > 0)
  464. {
  465. cell->RemoveChild(cell->GetChild(0));
  466. }
  467. // Add the new contents to the cell.
  468. Core::Factory::InstanceElementText(cell, cell_string);
  469. }
  470. else
  471. {
  472. RMLUI_ERROR;
  473. }
  474. }
  475. dirty_cells = false;
  476. }
  477. // Instantiates the children that haven't been fully loaded yet.
  478. void ElementDataGridRow::LoadChildren(float time_slice)
  479. {
  480. double start_time = Core::Clock::GetElapsedTime();
  481. int data_query_offset = -1;
  482. int data_query_limit = -1;
  483. // Iterate through the list of children and find the holes of unloaded
  484. // rows.
  485. // - If we find an unloaded element, and we haven't set the offset
  486. // (beginning of the hole), then we've hit a new hole. We set the offset
  487. // to the current index and the limit (size of the hole) to 1. If we've
  488. // found a hole already and we find an unloaded element, then we
  489. // increase the size of the hole.
  490. // - The end of a hole is either a loaded element or the end of the list.
  491. // In either case, we check if we have a hole that's unfilled, and if
  492. // so, we fill it.
  493. bool any_dirty_children = false;
  494. for (size_t i = 0; i < children.size() && float(Core::Clock::GetElapsedTime() - start_time) < time_slice; i++)
  495. {
  496. if (children[i]->dirty_cells)
  497. {
  498. any_dirty_children = true;
  499. if (data_query_offset == -1)
  500. {
  501. data_query_offset = (int)i;
  502. data_query_limit = 1;
  503. }
  504. else
  505. {
  506. data_query_limit++;
  507. }
  508. }
  509. else if (children[i]->dirty_children)
  510. {
  511. any_dirty_children = true;
  512. }
  513. bool end_of_list = i == children.size() - 1;
  514. bool unfilled_hole = data_query_offset != -1;
  515. bool end_of_hole_found = !children[i]->dirty_cells;
  516. // If this is the last element and we've found no holes (or filled them
  517. // all in) then all our children are loaded.
  518. if (end_of_list && !unfilled_hole)
  519. {
  520. if (!any_dirty_children)
  521. {
  522. dirty_children = false;
  523. }
  524. }
  525. // Otherwise, if we have a hole outstanding and we've either hit the
  526. // end of the list or the end of the hole, fill the hole.
  527. else if (unfilled_hole && (end_of_list || end_of_hole_found))
  528. {
  529. float load_time_slice = time_slice - float(Core::Clock::GetElapsedTime() - start_time);
  530. LoadChildren(data_query_offset, data_query_limit, load_time_slice);
  531. data_query_offset = -1;
  532. data_query_limit = -1;
  533. }
  534. }
  535. if (children.empty())
  536. {
  537. dirty_children = false;
  538. }
  539. }
  540. void ElementDataGridRow::LoadChildren(int first_row_to_load, int num_rows_to_load, Rml::Core::Time time_slice)
  541. {
  542. double start_time = Core::Clock::GetElapsedTime();
  543. // Now fetch these new children from the data source, pass them
  544. // through each column's data formatter, and add them as our new
  545. // child rows.
  546. Rml::Core::String column_query = parent_grid->GetAllColumnFields() + "," + DataSource::CHILD_SOURCE;
  547. DataQuery query(data_source, data_table, column_query, first_row_to_load, num_rows_to_load);
  548. for (int i = 0; i < num_rows_to_load; i++)
  549. {
  550. int index = first_row_to_load + i;
  551. if (!query.NextRow())
  552. {
  553. Core::Log::Message(Rml::Core::Log::LT_WARNING, "Failed to load row %d from data source %s", i, data_table.c_str());
  554. }
  555. // Now load the child with the row in the query.
  556. children[index]->Load(query);
  557. if (float(Core::Clock::GetElapsedTime() - start_time) > time_slice)
  558. {
  559. break;
  560. }
  561. }
  562. }
  563. void ElementDataGridRow::DirtyCells()
  564. {
  565. dirty_cells = true;
  566. if (parent_row)
  567. {
  568. parent_row->DirtyRow();
  569. }
  570. }
  571. void ElementDataGridRow::DirtyRow()
  572. {
  573. dirty_children = true;
  574. if (parent_row)
  575. {
  576. parent_row->DirtyRow();
  577. }
  578. }
  579. // Sets this row's child rows to be visible.
  580. void ElementDataGridRow::Show()
  581. {
  582. SetProperty(Core::PropertyId::Display, Core::Property(Core::Style::Display::InlineBlock));
  583. if (row_expanded)
  584. {
  585. for (size_t i = 0; i < children.size(); i++)
  586. {
  587. children[i]->Show();
  588. }
  589. }
  590. }
  591. // Sets this row's children to be invisible.
  592. void ElementDataGridRow::Hide()
  593. {
  594. SetProperty(Core::PropertyId::Display, Core::Property(Core::Style::Display::None));
  595. for (size_t i = 0; i < children.size(); i++)
  596. {
  597. children[i]->Hide();
  598. }
  599. }
  600. }
  601. }