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

Hide Row Details on Click

7 Answers 83 Views
GridView
This is a migrated thread and some comments may be shown as answers.
bayprince
Top achievements
Rank 1
bayprince asked on 06 Apr 2011, 04:02 PM
We have a RadGridView with the RowVisibilityMode set to VisibleWhenSelected. This works great when you select a row and then another row.  Is it possible to close the current row details by clicking on the same row (the row and not the row details)?

7 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Ivanov
Telerik team
answered on 11 Apr 2011, 09:05 AM
Hi bayprince,

I have prepared a sample project for you. Please, refer to it and do not hesitate to contact us immediately if you have any further inquiries.

Best wishes,
Ivan Ivanov
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
0
bayprince
Top achievements
Rank 1
answered on 12 Apr 2011, 05:27 PM
Thank you for the quick reply.  The solution doesn't appear to work with the VisibleWhenSelected feature.  We want only a single row to be selected at a time.  If it possible to check if the current row is already selected during the "mouse down" event?
0
Ivan Ivanov
Telerik team
answered on 12 Apr 2011, 05:40 PM
Hi bayprince,

I have updated the initial projects. The new approach mimics the behavior of VisibleWhenSelected mode, so please unset the RowDetailsVisibilityMode before testing my workaround.

Regards,
Ivan Ivanov
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
0
bayprince
Top achievements
Rank 1
answered on 12 Apr 2011, 05:53 PM
Thanks again for the quick response.  The attached project doesn't appear to be working properly when selecting a different item.

We want to have only a single item selected at a time. If that row is selected again, we want to unselect it.
0
Accepted
Ivan Ivanov
Telerik team
answered on 13 Apr 2011, 08:18 AM
Hi bayprince,

Excuse me, I have misunderstood your requirements. I am sending you a modified version of the initial project. Please, let me know if this approach meets your requirements. 

All the best,
Ivan Ivanov
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
0
bayprince
Top achievements
Rank 1
answered on 13 Apr 2011, 02:51 PM
Thanks! The solution worked perfectly. 

The only pending issue is that we have clickable links in the Details area which are being ignored due to the MouseDown event.  I added a IsHitTestVisible to the Details template, but that doesn't solve the issue. Is it possible to only have the MouseDown event just on the "row" not the "detail"?
0
Ivan Ivanov
Telerik team
answered on 19 Apr 2011, 09:53 AM
Hi bayprince,

Since the details presenter is a part of GridViewRow's template, this is an expected behavior when attaching additional event handlers. In order to achieve your requirements, you may try modifying my project by attaching handlers to master RadGridView's GridViewCells, instead of GridViewRows.
 
Best wishes,
Ivan Ivanov
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
bayprince
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
bayprince
Top achievements
Rank 1
Share this question
or