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

[Solved] Click HyperlinkButton in GridView Can't select currect item

1 Answer 89 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.
redstar
Top achievements
Rank 1
redstar asked on 28 Feb 2011, 10:43 AM
Hi, 
there is a RadGridView bind to PagedCollectionView , and there is a HyperlinkButton in the first column

<

 

 

telerik:GridViewDataColumn Header="Market Client Profile" SortMemberPath="Name">

 

 

<telerik:GridViewDataColumn.CellTemplate>

 

 

<DataTemplate>

 

 

<HyperlinkButton Content="{Binding Name}" Command="{Binding DetailCommand,Source={StaticResource   ViewModel}}" Style="{StaticResource GridHyperLink}" HorizontalAlignment="Left" VerticalAlignment="Top"/>

 

 

 

</DataTemplate>

 

</telerik:GridViewDataColumn.CellTemplate>

 

 

</telerik:GridViewDataColumn>

 

 

 



the question is when i click the HyperlinkButton, the PagedCollectionView does not move to current item. this works well in Silverlight build-in DataGrid.

Please help me!

1 Answer, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 28 Feb 2011, 12:47 PM
Hi redstar,

Indeed RadGridView does not take care internally to update the current item , as the typical scenario involves navigation to another place.

For your specific case there is an easy workaround. Within the click handler , you can programmatically set the current item of the parent TreeListView. (you can get the item by casting the DataContext of the sender hyperlink button to your business object) .

Regards,
Pavel Pavlov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
GridView
Asked by
redstar
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Share this question
or