Row Details Selection

7 posts, 0 answers
  1. GlenC
    GlenC avatar
    12 posts
    Member since:
    May 2009

    Posted 13 Dec 2011 Link to this post

    Dear Telerik,
    I have a GridView with RowDetails that are also shown as a GridView. My problem is that if an item is selected on the RowDetailGridView, and then another item selected on a different row's RowDetail, if you then try and click on the original RowDetail row again nothing happens if you happen to select it on the same cell - a different cell on the same row is OK, but even with RowSelect on you don't get the event firing if you select the same cell again. The rows are read only as well.

    Our users are telling us that this is a problem for them - I think because even though the row is selected  on the RowDetails GridView, you can still see which cell was selected and the user is drawn back to selecting the same cell again.

    Do you know of any work around or solution for this please ?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 14 Dec 2011 Link to this post

    Hi Glenc,

    I have tested the described scenario. What I do is:
    1. I expand row details
    2. I click on the first row of the RowDetailGridView
    3. I click on the third row
    4. I click back to the first row (that was previously selected, clicking it on the same cell as I have clicked initially).

    Still I was not able to reproduce such a problem. So I have some specific questions on your particular case.
    1. According to this ticket information you use the 2011.3.1116 version of the RadControls. Is that correct?
    2. Could you please guide me on how do I need to select the rows, so that I can see the described behaviour? 

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. GlenC
    GlenC avatar
    12 posts
    Member since:
    May 2009

    Posted 15 Dec 2011 Link to this post

    HI Didie ,

    My problem occurs if you select a row in the RowDetails of a different parent row of the GridView, and then go back to the original, rather than when you select different rows of the ROwDetail in the same parent row, and then only if you select the same cell as you did before - any other cell in the same row is OK. Hopefully that makes sense?



    Regards

    Glen
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Dec 2011 Link to this post

    Hello Glenc,

    Based on your description, I have tested the following scenario:
    1. I select row 1 under parent 1
    2. I select row 2 under parent 2
    3. I select row 1 under parent 1 clicking on the current cell.

     What I get is that when I select the same cell the second time, the cell goes into edit mode. The row 1 is already selected, and it remains selected when I select it the second time.

    Is that the scenario that you have?

    Greetings,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. GlenC
    GlenC avatar
    12 posts
    Member since:
    May 2009

    Posted 15 Dec 2011 Link to this post


    My grids are all in ReadOnly mode, so do not go into Editmode. 

    What I want to be able to do is go back to a previously selected row in the row details and be able to select the same row that was previously selected. This only seems to happen if the user selects a different cell on the same row as before. If the user selects the same cell as previously selected then nothing happens, but I think they naturally select the same cell because then they only have to move the mouse up and down and not left/right at all. Plus the selected cell is highlighted with a box around it even when in RowSelect mode.

    Glen
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 15 Dec 2011 Link to this post

    Hello Glenc,

     I understand your description now. Could you just tell if the event that you would like to raise is SelectionChanged? 

    If so, this would not be possible. When the row is selected, and you select it again, then the SelectionChanged does not fire as the selection has not changed.

    I may suggest you a workaround that allows you to run your logic when a row (or a cell) has been clicked.

    void playersGrid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
           {
              var s = e.OriginalSource as FrameworkElement;
              if (s is TextBlock)
              {
                  var parentRow = s.ParentOfType<GridViewRow>();
                  if (parentRow != null)
                  {
                      MessageBox.Show("SelectionChanged on click");
                      // do what you want to do when the row has been clicked
                  }
              }
           }


    I am attaching a sample test project. Could you please check it ant let me know if this could work for your case.

    Kind regards,
    Didie
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  8. GlenC
    GlenC avatar
    12 posts
    Member since:
    May 2009

    Posted 15 Dec 2011 Link to this post

    Thanks for the test project - at first glance it appears to do what I need, I will probably have to have a look at it over the next few days to see if I can work your solution into my project.

    I'll let you know how I get on.

    Regards

    Glen
Back to Top
DevCraft banner