Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

363
Views
Blazor - AntDesign: abra la ventana emergente de una fila de tabla seleccionada con el clic derecho del mouse

Estoy usando una tabla AntDesign con una selección. Si selecciono a una persona y uso el botón derecho del mouse, quiero mostrar la ventana emergente de la fila seleccionada. Ya he deshabilitado el menú contextual si uso el botón derecho del mouse.

¿Cómo es posible mostrar exactamente el popover de la fila seleccionada?

 <div oncontextmenu="return false;" @onmouseup="HandleMouseUp"> <AntDesign.Table DataSource="@persons" TItem="Person" @bind-SelectedRows="@selectedRows"> <Selection Key="@(context.Id.ToString())"/> <Column Title="Name"> @(context.Name) </Column> <Column Title="Surname"> @(context.Surname) </Column> <ActionColumn Title="Settings"> <Popover Trigger="@(new Trigger[] { Trigger.Click})"> <ContentTemplate> <Button Type="@ButtonType.Text" @onclick="@(() => DeletePersonAsync(context))" /> Delete </Button> </ContentTemplate> <ChildContent> <Button type="primary" @onclick="@(() => HandleMoreActionsClicked(context))">Actions</Button> </ChildContent> </Popover> </ActionColumn> </AntDesign.Table> </div> @code { private List<Person> persons = new(); private IEnumerable<Person> selectedRows = new(); protected override void OnInitialized() { persons = GetListOfPersons(); } private void HandleMouseUp(MouseEventArgs args) { if (args.Button == 2) { if(selectedRows.Count() == 0) { return; } else if(selectedRows.Count() == 1) { var currentRow = selectedRows.First(); //open Popover for this row } else { //TODO } } } private async Task DeletePersonAsync(Person person) { await Client.DeletePersonAsync(person); } private void HandleMoreActionsClicked(Person clickedRowItem) { if (!selectedRows.Any(r => r.Id == clickedRowItem.Id)) { selectedRows = new List<Person> { clickedRowItem }; } }

}

about 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!