How to sync row details toggle key in two gridviews?

1 Answer 18 Views
GridView
Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
Psyduck asked on 20 Jan 2022, 09:17 AM

Hello.

I made a detail row (group) in two grid views.

Both gridview data use the same data and have different outputs.
Here, i want both gridviews to expand equally in the same row when toggled.

(Otherwise, the data can be ignored. I want extended sync on the same data.)


I tried several searches such as RowDetailsVisibilityChanged, toggle style, toggle custom enable behavior, but nothing worked.

Attach the basic data. please help.
Thank you.

1 Answer, 1 is accepted

Sort by
1
Accepted
Dilyan Traykov
Telerik team
answered on 24 Jan 2022, 02:17 PM

Hello Psyduck,

Thank you for the provided project.

The most straightforward approach which comes to mind is to expose an additional property of the TestModel class and bind it to the DetailsVisibility property of the rows:

        <Grid.Resources>
            <Style TargetType="telerik:GridViewRow">
                <Setter Property="DetailsVisibility" Value="{Binding DetailsVisibility, Mode=TwoWay}" />
            </Style>
        </Grid.Resources>

Attached you can find a modified version of this project which demonstrates this approach.

Please have a look and let me know if something similar would work in your original application.

Regards,
Dilyan Traykov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
commented on 25 Jan 2022, 12:46 AM

Thank you always :)
Tags
GridView
Asked by
Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
Answers by
Dilyan Traykov
Telerik team
Share this question
or