Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong column passed as argument in DataGridCellTapDetails #2224

Open
mathlizee opened this issue Dec 23, 2024 · 2 comments
Open

Wrong column passed as argument in DataGridCellTapDetails #2224

mathlizee opened this issue Dec 23, 2024 · 2 comments
Labels
data grid Data grid component waiting for customer response Cannot make further progress until the customer responds.

Comments

@mathlizee
Copy link

Bug description

Hello!

When handling the onCellSecondaryTap event, the DataGridCellTapDetails passed as an argument to the callback somtimes has the wrong column:

  1. When secondary tapping a row that is a group title
  2. When secondary tapping a summary row which showSummaryInRow is true

In these 2 cases, the column seems to always be the first column of the row. Would it be possible that the column is rather the one in which the secondary tap occurred?

Thanks!
Mathieu

Steps to reproduce

  1. Secondary click in a row that is a group title
  2. OR
  3. Secondary click in a row that is a summary row which showSummaryInRow is true

Code sample

Code sample
GridTableSummaryRow(
  title: 'Test',
  color: Theme.of(context).colorScheme.surfaceContainer,
  columns: [
    GridSummaryColumn(
      name: 'SummaryColumn',
      columnName: 'FirstColumnName',
      summaryType: GridSummaryType.count,
    ),
  ],
  position: GridTableSummaryRowPosition.top,
)

Screenshots or Video

Screenshots / Video demonstration

[Upload media here]

Stack Traces

Stack Traces
[Add the Stack Traces here]

On which target platforms have you observed this bug?

Windows

Flutter Doctor output

Doctor output

syncfusion_flutter_datagrid: ^28.1.33

[✓] Flutter (Channel stable, 3.24.4, on Microsoft Windows [Version 10.0.19045.5247], locale en-CA)
[✓] Windows Version (Installed version of Windows is version 10 or higher)      
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Visual Studio - develop Windows apps (Visual Studio Professional 2022 17.12.3)
[!] Android Studio (version 2022.1)
    ✗ Unable to determine bundled Java version.
[✓] Android Studio (version 2023.3)
[✓] VS Code, 64-bit edition (version 1.96.0)
[✓] Connected device (3 available)
[✓] Network resources
@abineshPalanisamy
Copy link

Hi @mathlizee ,

In SfDataGrid, when the table summary row is enabled with showSummaryInRow set to true, the first column cell expands across all columns and appears as a full row. Similarly, when grouping is enabled, the caption summary row also spans all columns. Consequently, tapping on either the table summary row or the caption summary row will always return the index and value of the first column only. This is the expected behavior.

Please let us know if you have any further questions. We are happy to assist you.

Regards,
Abinesh P

@ashok-kuvaraja ashok-kuvaraja added data grid Data grid component waiting for customer response Cannot make further progress until the customer responds. labels Dec 23, 2024
@mathlizee
Copy link
Author

mathlizee commented Dec 23, 2024

Hi @abineshPalanisamy,

Thank you for your explanation!

In that case, in there any way to know if the row that has been secondary tapped is a group caption summary row? Or to get a collection of the rows that includes all group caption summary rows (since gridSource.rows and gridSource.effectiveRows do not include the group caption summary rows) ?

This way, we could determine if the column argument should be used (or not) in our code.

Thanks again!
Mathieu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data grid Data grid component waiting for customer response Cannot make further progress until the customer responds.
Projects
None yet
Development

No branches or pull requests

3 participants