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

Cannot select first row after loading when IsSynchronizedWithCurrentItem = false

3 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Zamel
Top achievements
Rank 1
Zamel asked on 20 Feb 2014, 01:16 PM
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

3 Answers, 1 is accepted

Sort by
0
Zamel
Top achievements
Rank 1
answered on 21 Feb 2014, 11:18 AM
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
0
Yoan
Telerik team
answered on 21 Feb 2014, 11:41 AM
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
0
Zamel
Top achievements
Rank 1
answered on 25 Feb 2014, 01:29 PM
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! :-)
Tags
GridView
Asked by
Zamel
Top achievements
Rank 1
Answers by
Zamel
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or