# AccordionCancelEventArgs

Namespace: **Wisej.Web**

Assembly: **Wisej.Framework** (4.0.0.0)

Provides data for the [Selecting](/api/wisej.web/containers/accordion.md#selecting) and [Deselecting](/api/wisej.web/containers/accordion.md#deselecting) events of a [Accordion](/api/wisej.web/containers/accordion.md) control.

{% tabs %}
{% tab title="C#" %}

```csharp
public class AccordionCancelEventArgs : CancelEventArgs
```

{% endtab %}

{% tab title="VB.NET" %}

```visual-basic
Public Class AccordionCancelEventArgs
    Inherits CancelEventArgs
```

{% endtab %}
{% endtabs %}

## Constructors

### ![](/files/hsR4ok3152WyAf8J2C1u) AccordionCancelEventArgs(panel, panelIndex, cancel, action)

Initializes a new instance of the [AccordionCancelEventArgs](/api/wisej.web/containers/accordion/wisej.web.accordioncanceleventargs.md) class.

| Name           | Type                                                                                | Description                                                                                                       |
| -------------- | ----------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| **panel**      | [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md)   | The [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) the event is occurring for. |
| **panelIndex** | [Int32](https://docs.microsoft.com/dotnet/api/system.int32)                         | The zero-based index of *panel* in the [Panels](/api/wisej.web/containers/accordion.md#panels) collection.        |
| **cancel**     | [Boolean](https://docs.microsoft.com/dotnet/api/system.boolean)                     | true to cancel the panel change by default; otherwise, false.                                                     |
| **action**     | [AccordionAction](/api/wisej.web/containers/accordion/wisej.web.accordionaction.md) | One of the [AccordionAction](/api/wisej.web/containers/accordion/wisej.web.accordionaction.md) values.            |

## Properties

### ![](/files/hsR4ok3152WyAf8J2C1u) Action

[AccordionAction](/api/wisej.web/containers/accordion/wisej.web.accordionaction.md): Returns a value indicating which event is occurring.

### ![](/files/hsR4ok3152WyAf8J2C1u) Panel

[AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md): Returns the [AccordionPanel](/api/wisej.web/containers/accordion/wisej.web.accordionpanel.md) the event is occurring for.

### ![](/files/hsR4ok3152WyAf8J2C1u) PanelIndex

[Int32](https://docs.microsoft.com/dotnet/api/system.int32): Returns the zero-based index of the [Panel](#panel) in the [Panels](/api/wisej.web/containers/accordion.md#panels) collection.

## Used By

| Name                                                                                                        | Description                                                                                                                                                                                                                                           |
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AccordionCancelEventHandler](/api/wisej.web/containers/accordion/wisej.web.accordioncanceleventhandler.md) | Represents the method that will handle the [Selecting](/api/wisej.web/containers/accordion.md#selecting) or [Deselecting](/api/wisej.web/containers/accordion.md#deselecting) event of a [Accordion](/api/wisej.web/containers/accordion.md) control. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wisej.com/api/wisej.web/containers/accordion/wisej.web.accordioncanceleventargs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
