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

[Solved] How to close rowdetails when having RowDetailsVisibilityMode="VisibleWhenSelected"

1 Answer 187 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ole
Top achievements
Rank 1
Ole asked on 16 Jun 2011, 12:02 PM
Hi,

I am having a gridview with RowDetailsVisibilityMode="VisibleWhenSelected". How can I close rowdetail / deselect row , without have to open another rowdetails / select another row, so there will be no rowdetails open ?.

Ihave tried the following.
I placed a button with this code

private void btnCloseDetail_Click(object sender, RoutedEventArgs e)
       {
           var btn = (RadButton)sender;
           var row = btn.ParentOfType<GridViewRow>();
           row.DetailsVisibility = Visibility.Collapsed;
       }

in the row details template.

This closed the rowdetails, but it stayed closed forever. clicking on another row and clicking back did not reopen the detailsrow.


best regards

Ole
 

1 Answer, 1 is accepted

Sort by
0
Accepted
Milan
Telerik team
answered on 16 Jun 2011, 12:05 PM
Hi Ole,

You can deselect a row by holding down the CTRL button and clicking on that row with the left mouse button. Once a row is deselected its corresponding details will be closed. 

All the best,
Milan
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
Ole
Top achievements
Rank 1
Answers by
Milan
Telerik team
Share this question
or