Skip to content

Commit a8012d7

Browse files
Merge pull request #3341 from syncfusion-content/columnDragDropTemp
Code changes regarding the serialization and column drag drop temp UG.
2 parents 8b73173 + acbc890 commit a8012d7

File tree

4 files changed

+552
-0
lines changed

4 files changed

+552
-0
lines changed
Loading

MAUI/DataGrid/column-drag-and-drop.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,33 @@ The SfDataGrid allows customizing the drag view text and background color using
203203

204204
<img alt="DataGrid column drag view background and text color" src="Images\column-drag-and-drop\maui-datagrid-drag-view-background-and-text-color.png" width="450"/>
205205

206+
### Column drag-and-drop template
207+
208+
The SfDataGrid allows you to load specific content into the column drag-and-drop template using the [SfDataGrid.ColumnDragDropTemplate](). The content can be provided through either a DataTemplate or a DataTemplateSelector.
209+
210+
The following code snippet demonstrates how to load a data template into the column drag-and-drop view:
211+
212+
{% tabs %}
213+
{% highlight xaml %}
214+
215+
<syncfusion:SfDataGrid>
216+
<syncfusion:SfDataGrid.ColumnDragDropTemplate>
217+
<DataTemplate>
218+
<Grid BackgroundColor="LightBlue">
219+
<Label Text="Drag View"
220+
TextColor="Orange"
221+
HorizontalTextAlignment="Center"
222+
VerticalTextAlignment="Center" />
223+
</Grid>
224+
</DataTemplate>
225+
</syncfusion:SfDataGrid.ColumnDragDropTemplate>
226+
</syncfusion:SfDataGrid>
227+
228+
{% endhighlight %}
229+
{% endtabs %}
230+
231+
<img alt="Column drag and drop template" src="Images\column-drag-and-drop\maui-datagrid-column-drag-and-drop-template.gif" Width="404" />
232+
206233
## Cancel auto scrolling
207234

208235
Auto-scrolling during column dragging can be disabled using the `CanAutoScroll` argument in the `QueryColumnDragging` event.

0 commit comments

Comments
 (0)