Grid Row Sort

Grid for Vue

Vue 3 version using Smart custom elements and template refs.

What this topic covers: practical setup, the framework-specific API access pattern, and copy-adapt guidance for the examples in this page.

<script setup>
import { onMounted, ref } from 'vue';
import 'smart-webcomponents/source/styles/smart.default.css';
import 'smart-webcomponents/source/modules/smart.grid.js';

const component = ref();
const componentProps = {
  // Copy this topic's JavaScript configuration here.
};

onMounted(() => {
  Object.assign(component.value, componentProps);
});
</script>

<template>
  <smart-grid ref="component"></smart-grid>
</template>

Use component.value for API methods in this topic.

Row Drag

You can drag rows and reorder rows in the Grid. The following properties should be set to enable row dragging.

behavior: {
	allowRowReorder: true
},
appearance: {
	showRowHeader: true,
	showRowHeaderDragIcon: true
}
	


The 'rowDragStart', 'rowDragging', 'rowDragEnd' and 'rowReorder' events occur during the drag and drop process.
The following example shows how to implement drag and drop of rows between two Grid instances.

For AI tooling

Developer Quick Reference

Topic: grid-row-reorder   Component: Grid   Framework: Vue

Main methods: (none detected)

Common config keys: behavior, appearance

Implementation Notes

Compatibility: Vue 3+   API access pattern: const component = ref() + component.value.method()

Lifecycle guidance: Use template refs with