Skip to main content

dsUpdateLock

dsUpdateLock

Locks or unlocks DataSet updates to optimize the performance of bulk changes.

Parameters

  • dmName (String): The DataSet name (DM name)
  • updateLock (bool): true locks, false unlocks. Defaults to true
  • applyData (bool): Whether to apply the accumulated changes to the UI all at once when unlocking. Defaults to true

Returns: None (void)

Description

When you change a large number of DS values in a row, locking keeps intermediate states out of the UI and improves performance. On unlock, if applyData is true, all the changes are rendered at once.

Example

// 100개 행 일괄 수정 (성능 최적화)
$vm.dsUpdateLock("mainDS", true);

for (var i = 0; i < 100; i++) {
$vm.setDSValue("mainDS.list[" + i + "].checked", false);
}

// 잠금 해제 후 한 번에 UI 반영
$vm.dsUpdateLock("mainDS", false, true);

Related

  • $vm.isDsUpdateLock(dmName) — check the current lock state
  • $vm.setDSValue(path, value) — set a DS value