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

Docs: DetailRow samples update #5940

Merged
merged 4 commits into from
Jan 22, 2025
Merged

Conversation

tesar-tech
Copy link
Collaborator

Description

Closes #4745

Adds sample code that demonstrates two functionalities:

  • How to distinguish between an opened and a closed detail row.
  • How to indicate when a detail row can be expanded.

While the implementation works, it may not fully address the original discussion, Datagrid check if detailrow is displayed.

Currently, there is no straightforward way to achieve this. The current solution relies on tracking "which rows have been clicked," which is indirectly tied to the detail row display. This approach is fragile and can easily break, especially when manual triggers for detail rows are added.

A better solution could involve exposing DataGridRowInfo.HasDetailRow by making DataGrid.GetRowInfo public and optimizing its performance.

???

… rows, and displays an icon when a detail row can be expanded.
@tesar-tech tesar-tech requested a review from stsrki January 19, 2025 20:37
@tesar-tech
Copy link
Collaborator Author

The test errors are weird and have nothing to do with the actual code change.

I think these are caused by the update of ubuntu-latest, because this last successful run is on 22.04
image

while now ubuntu-latest is on 24.04

image

@stsrki
Copy link
Collaborator

stsrki commented Jan 20, 2025

The test errors are weird and have nothing to do with the actual code change.

I think these are caused by the update of ubuntu-latest, because this last successful run is on 22.04 image

while now ubuntu-latest is on 24.04

image

Can we specify the exact ubuntu version to make them run?

@stsrki
Copy link
Collaborator

stsrki commented Jan 20, 2025

A better solution could involve exposing DataGridRowInfo.HasDetailRow by making DataGrid.GetRowInfo public and optimizing its performance.

It could be exposed, yes. But there are some API that are kinda internal and that user shouldn't need to know and not be able to use. Like TableRow, SetRowDetail, ToggleDetailRow, SetTableRow. They are part of the DataGrid lifecycle and can affect how DataGrid works if used incorrectly.

@tesar-tech
Copy link
Collaborator Author

Can we specify the exact ubuntu version to make them run?

Yes, that will work.. Also the older dotnets (6,7) are not part of the ubuntu 24.04, it is still installable and working, but we (I) removed the installation step for these, I wasn't aware it is being removed with new version. (we can easily revert that change, it's on master branch).

22.04 will be removed (probably) on April 2027.

options:

  • merge this (and propagate to other branches), wait until april 27 when the issue will be fixed, documented or non-existent
  • try to fix it now, revert installation for older dotnets.

@tesar-tech
Copy link
Collaborator Author

It could be exposed, yes. But there are some API that are kinda internal and that user shouldn't need to know and not be able to use. Like TableRow, SetRowDetail, ToggleDetailRow, SetTableRow. They are part of the DataGrid lifecycle and can affect how DataGrid works if used incorrectly.

Yes, I understand it is private for a reason. Question is: should I try to came up with a solution for exposing the HasDetailRow state? I guess that would go to master branch so the answers doesn't block merging of this pr.

@stsrki
Copy link
Collaborator

stsrki commented Jan 22, 2025

Yes, I understand it is private for a reason. Question is: should I try to came up with a solution for exposing the HasDetailRow state? I guess that would go to master branch so the answers doesn't block merging of this pr.

I guess it might be worth it. It's good to know that information. Now that we are pursuing this. I think HasDetailRow is a weird name. So we can try having something more descriptive like DetailRowExpanded.

I will open new issue.

@stsrki stsrki merged commit b74fc76 into rel-1.7 Jan 22, 2025
2 checks passed
@stsrki stsrki deleted the sup/rel-1.7/docs-detail-row-displayed branch January 22, 2025 09:05
@github-actions github-actions bot locked and limited conversation to collaborators Jan 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants