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

[Solved] Expand detailview on row select?

3 Answers 115 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jake
Top achievements
Rank 1
Jake asked on 16 Aug 2011, 04:01 PM
Is it possible to expand the detailview for a row when the row is selected vs. having to display/click the "+/-" column?  From a usability standpoint, it would be easier for the user to click anywhere on a row to expand it vs. having to use the "+/-" button.

Thanks for any info!

3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 17 Aug 2011, 07:58 AM
Hi Jake,

You may achieve similar functionality by using grid's collapseRow/expandRow methods:

function grid_rowSelect(e) {   
    var grid = $(this).data('tGrid'),
        row = $(e.row);      
              
    if (row.next(".t-detail-row").is(":visible")) {
        grid.collapseRow(row);
    } else {
        grid.expandRow(row);
    }
}

Regards,
Rosen
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
Jake
Top achievements
Rank 1
answered on 22 Aug 2011, 06:55 PM
Thanks that works great!

Next question is how does one hide the "+/-" column that appears by default when a detailview is defined for a grid?

My apologies for asking if this information is available somewhere else.  The documentation on the MVC controls is not quite as extensive as the ASP.NET AJAX set of controls (which is understandable...for now :-)
0
Atanas Korchev
Telerik team
answered on 23 Aug 2011, 06:20 AM
Hello Jake,

 You can hide the icons via the following CSS:

.t-grid .t-hierarchy-cell .t-icon
{
   display: none;
}

Regards,

Atanas Korchev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Grid
Asked by
Jake
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Jake
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or