This is a migrated thread and some comments may be shown as answers.

Programmatically expanding/collapsing rowdetails

1 Answer 110 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Neal Robben
Top achievements
Rank 1
Neal Robben asked on 27 Apr 2010, 10:54 PM
I have a gridview that contains a list of objects. It has a rowdetails template so that each row can be expanded to show an extra panel with more details.

Now I need to be able to change the details-visibility for a single row (or multiple if I choose) from code.

I have tried looping over all the rows in the grid and then calling DetailsVisibility = Visibility.Collapsed (or expanded) on each of them.

This gives me a weird result because it doesn't appear to be working for all rows. I get the impression that it only works for those that are visible at the time the code is called.

If I have a grid full of expanded rows (so that there are a number of them that aren't visible unless you scroll down)...and then execute the code to collapse all the rows in the grid... Then it doesn't work for all of the rows. Some of them remain expanded... Then I click again and some more rows collapse, and I have to keep clicking several times, each time closing some extra rows.

This looks very strange because the code _myGridviewRow.DetailsVisibility = Visibility.Collapsed is called on each row but it really looks like it doesn't affect the rows that are offscreen at that moment.

I would expect the property-change to have taken effect then when they come back into view, but it doesn't.

Does anyone know of a solution to this problem? I just need to be able to programmatically expand or collapse the details of an individual row (or a couple of rows that I choose) from the code-behind.



1 Answer, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 28 Apr 2010, 08:37 AM
Hi Neal Robben,

That sound weird. We have tried to reproduce this but we could not.

Could you please open a separate support ticket and send us a sample project that reproduces this. We will take a look at it immediately. Thanks in advance.

Greetings,
Ross
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Neal Robben
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Share this question
or