Allow drag/drop from only HeaderTemplate area of panel
Is it possible to only allow drag/drop to be active for the headertemplate area of a panel? We have active content in the contentemplate that is looking for mouse down and drag/drop enabled is causing problems with this.
<SfDashboardLayout ID="dashboard" AllowDragging=@true AllowResizing=@true Columns=@DashBoardColumns CellAspectRatio=@DashBoardAspectratio @[email protected]>
<DashboardLayoutEvents Created=@DashBoardCreate Changed=@DashBoardTileChange OnResizeStop="DashBoardResizeStop"/>
<DashboardLayoutPanels>
@foreach (DashBoardTile DashBoardTileObj in this?.DashBoardObj?.Tiles)
{
<DashboardLayoutPanel [email protected]()
@key=@DashBoardTileObj>
<HeaderTemplate>
@{ var Scope = this.DashBoardObj.Scopes.Where(x => x.DashBoardScopeId == DashBoardTileObj.ScopeId).FirstOrDefault();
var ScopeName = "Not found";
if (Scope != null)
{
ScopeName = Scope.Name;
}
<DashBoardTileHeader DashBoardTileObj=@DashBoardTileObj
DashBoardScopeName=@ScopeName
OpenTileSettingsCallback=@OpenDashBoardTileSetting
DeleteTileCallback=@DeleteDashBoardTile
DownloadTileDataCallback=@DownLoadDashBoardTileData
CloneTileCallback="@CloneDashBoardTile"></DashBoardTileHeader>
}
</HeaderTemplate>
<ContentTemplate>
<DashBoardTileContent DashBoardTileObj=@DashBoardTileObj @[email protected]></DashBoardTileContent>
</ContentTemplate>
</DashboardLayoutPanel>
}
</DashboardLayoutPanels>
</SfDashboardLayout>
SIGN IN To post a reply.
1 Reply
1 reply marked as answer
SS
Sharon Sanchez Selvaraj
Syncfusion Team
June 2, 2021 09:50 AM UTC
Hi Michael,
Greetings from Syncfusion Support.
We have checked with your query. In order to allow the dragging operations to the header content alone, you can specify the required handle using DraggableHandle property.
Refer to the code snippet:
|
<SfDashboardLayout CellSpacing="@(new double[]{10 ,10 })" Columns="5" AllowDragging="true" DraggableHandle=".e-panel-header">
</SfDashboardLayout> |
Refer to the sample below.
Refer to the below API link:
Please get back to us if you need further assistance.
Regards,
Marked as answer
SIGN IN To post a reply.
- 1 Reply
- 2 Participants
- Marked answer
-
MA Michael Aston
- Jun 1, 2021 10:29 AM UTC
- Jun 2, 2021 09:50 AM UTC