Skip to content

Grid with row drag&drop sortable like Sortable List #1132

Closed Answered by stormenergy91
stormenergy91 asked this question in Q&A
Discussion options

You must be logged in to vote

If anyone needs something similar, I built it this way:

1 In the Grid component, I added a custom class: table--sortable and the data-id="@context.Id" to the first column

<Grid @ref="itemsGrid" Class="table table-hover table-bordered table-striped table--sortable" DataProvider="TableItemsResultDataProvider"...

 <GridColumns>
     <GridColumn TItem="Core.Models.Crm.QuoteOption" HeaderText="Descrizione" PropertyName="DescriptionIt">
         <small data-id="@context.Id">
             @context.DescriptionIt
         </small>
     </GridColumn>
     ...

2 Then, in the page code, I added the following:

@{
   private DotNetObjectReference<MyComponent>? _dotNetRef;
   
   private IEnumerable<M…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by stormenergy91
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant