Cannot select first row after loading when IsSynchronizedWithCurrentItem = false

4 posts, 0 answers
  1. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 20 Feb 2014 Link to this post

    Hello,

    I set the IsSynchronizedWithCurrentItem of my gridview to false as our client did not want any selection at first. It's working fine but we noticed that after loading, focus is on the first row but we cannot select it, meaning we cannot get information from the row. We are also hooking up to the SelectionChanged event, so for every row selection, some fields in the page are being updated depending on the current row. However, as I've said, upon loading, the selection is not being triggered. We needed to select the second row first then go back to the first row to be able to select it. Is there any workaround for this? I would really appreciate your help.


    Thanks so much,
    Zamel
  2. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 21 Feb 2014 Link to this post

    I want to add:

    Also, if the grid has only one row, then rowselection is not being triggered. I also need to get certain info when a row is selected even if there's only one row in it.


    Thanks,
    Zamel
  3. DevCraft banner
  4. Yoan
    Admin
    Yoan avatar
    1068 posts

    Posted 21 Feb 2014 Link to this post

    Hi Zamel,

    I've tried to reproduce the problem you report, but to no avail. I have attached my test project for a reference. Could you check it and modify it in order to demonstrate the issue?

    Regards,
    Yoan
    Telerik
  5. Zamel
    Zamel avatar
    20 posts
    Member since:
    Aug 2012

    Posted 25 Feb 2014 Link to this post

    Hi Yoan,

    Thanks! You are right, it's working fine. The mistake I committed is that, I've set IsSynchronizedWithCurrentItem to false, but then somewhere in the code, I've been setting a selection in the grid so the behavior is being overwritten.

    Thank you so much for the help! It made me realize what I've been doing wrong!

    Very good support from your end! Thank you so much again! :-)
Back to Top