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

[Solved] Weird CurrentCellChanged Issue (Bug)

2 Answers 152 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.
Stephen Kennedy
Top achievements
Rank 1
Stephen Kennedy asked on 14 Jan 2010, 03:29 AM
Hi,

I am currently evaluating your grid control for a product that we are developing.  Generally I am quite satisified with your control library, however, I have a weird issue (which I suspect is a bug) when a button on the RowDetails pane has its visibility changed from Visible to Collapsed; the grid changes its CurrentCell to the first column on the next row down.  This issue happens for both the standard button and the RadButton, and quite possibly other controls.  Performing other UI affecting options on the buttons such as changing the enabled state does not cause this issue.

I am using the latest internal build of Q3 2009 Silverlight controls, Visual Studio 2010, Silverlight 4.

I am unable to attach the solution but I have submitted a couple of screen shots.

Steps to replicate:
1.  Create a Silverlight project
2.  Create a UserControl containing a button, and you should also create another control to make it easier to see the visual tree.  Set the click event of the button to change its visibility to Collapsed.
3.  Define a grid with a the RowDetailsTemplate set to a DataTemplate containing your UserControl.
4.  Create some data to associate with the grid.
5.  Run the project and click the button
6.  You will notice that the selected cell has changed, and the details pane remains in the same position, it no longer resides below the selected cell, but above it.

2 Answers, 1 is accepted

Sort by
0
Accepted
Rossen Hristov
Telerik team
answered on 15 Jan 2010, 10:14 AM
Hello Stephen Kennedy,

This happens because when the button becomes invisible focus is transferred to the next available cell on the bottom row. You can easily change that if you call Focus for the second button, or the UserControl itself.

private void Button_Click(object sender, RoutedEventArgs e)
{
    ((UIElement)sender).Visibility = Visibility.Collapsed;
    this.Focus();
}

I have attached a sample project. I hope this helps.

Kind regards,
Ross
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Stephen Kennedy
Top achievements
Rank 1
answered on 17 Jan 2010, 10:16 PM
Thanks Ross,

This indeed did resolve the issue.
Tags
GridView
Asked by
Stephen Kennedy
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Stephen Kennedy
Top achievements
Rank 1
Share this question
or