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

Collapse selected row and leave only details visible

5 Answers 157 Views
GridView
This is a migrated thread and some comments may be shown as answers.
vaitko
Top achievements
Rank 1
vaitko asked on 04 Jun 2010, 09:22 AM
Hi,

i'm using controls library for SL3 (Product version 2010.1.0309.1030) and currently i want to achieve this kind of functionality in radGridView:

user selects row, and can see expanded row details, but selected row should be hidden. What and how i should define in xam'l to achieve this? Is this possible at all? I have ControlTemplate for my gridViewRow, and tried to do it like this:

<VisualState x:Name="Selected">
                            <Storyboard>
                                <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DataCellsPresenter" Storyboard.TargetProperty="Visibility">
                                    <DiscreteObjectKeyFrame KeyTime="0:0:0" Value="Collapsed"/>
                                </ObjectAnimationUsingKeyFrames>
                            </Storyboard>
                        </VisualState>

but it hides just cells presenter, this means that i still can see the row just without cells.. can't find how can collapse entire row...


thanks

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 04 Jun 2010, 12:30 PM
Hello Gintaras Vaitkus,

You may take a look at this forum thread. However, the project there is for Silverlight 4, so I am sending you the same one but for Silverlight 3.
 

Kind regards,
Maya
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
vaitko
Top achievements
Rank 1
answered on 07 Jun 2010, 10:18 AM
thanks, it works!
0
vaitko
Top achievements
Rank 1
answered on 08 Jun 2010, 07:54 AM
One problem with atached sample.. when trying navigate from item to item using keyboard arrows (up and down) it doesn't work correctly, sometimes (randomly) some items are skipped, and i'm unable to jump to the last item with arrows somewhy.. can't figure out why it happens, i checked, there is no such problem in gridview sample with row details in controls library showcase... maybe it is because of this active row hiding? Do you have any ideas how to fix this weird behaviour?


thanks

0
vaitko
Top achievements
Rank 1
answered on 10 Jun 2010, 07:23 AM
any ideas?
0
Maya
Telerik team
answered on 10 Jun 2010, 04:09 PM
Hello Gintaras Vaitkus,

Indeed some of the rows are skipped when using the Up and Down Keys and it turns out to be as a result of loss of the focus. What could be done in this case is to reset and predefine those two commands in a CustomKeyboardProvider class that implements DefaultKeyboardCommandProvider. For example key.down can be handled as follows:

if (e.Key == Key.Down)
            {
                int i = this.playersGrid.Items.Count;
 
                if (this.playersGrid.SelectedItem != null && (this.playersGrid.Items.IndexOf(this.playersGrid.SelectedItem) + 1) < i)
                {
                    this.playersGrid.SelectedItem = this.playersGrid.Items[this.playersGrid.Items.IndexOf(this.playersGrid.SelectedItem) + 1];
                }


I am sending you a sample project so that you can see and test the proposed solution.


Kind regards,
Maya
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
vaitko
Top achievements
Rank 1
Answers by
Maya
Telerik team
vaitko
Top achievements
Rank 1
Share this question
or