Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

309
Vistas
Is there a way to show a custom popup on clicking a custom button which is in a cell in DataGrid in DevExpress?

I will have a separate column comprising of Approve and Reject Buttons. On clicking the approve button, it is expected that a custom popup is thrown stating ' Are you sure you want to approve'. The popup will have two buttons, yes(click event directed to a function) and no brings the user back to the same page.

Same is expected for the Reject button.

Code implemented in typescript (Angular 9 & above).

Please advise. TIA!

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

What you should do depends on which UI component library you are using. Virtually all UI component libraries have a modal component. So use the modal component that your library offers. e.g. Angular Material modal, ngx bootstrap modal, etc

However, if you just want to make your own custom modal its pretty easy. For example.

html:

<div>
  ...
  the main content for this component
  <button (click)="openModal()">open modal</button>
</div>

<div class="custom-modal-component" [class.hidden]="showModal">
  hello I am a modal
  <button (click)="closeModal()">close modal</button>      
  <button (click)="doSomethingAndCloseModal()">do something</button>      
</div>

scss:

.custom-modal-component {

  position: absolute;
  left: 50%;
  top: 50%;
  width: 500px;
  height: 500px;
  margin-left: -250px;
  margin-top: -250px;
  z-index: 100;

  &.hidden {
    display: none;
  }
}

ts:

showModal = false

openModal() {
  this.showModal = true
}

closeModal() {
  this.showModal = false
}

doSomethingAndCloseModal() {
  // do something code here
  this.closeModal()
}

You might want to enhance this custom solution by adding a background overlay, making it reusable, etc - reusability here ensures separation of concerns. With focus on reusability, the use of content projection is a must!

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda