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

GridView insert key does not work on empty grid

3 Answers 115 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Franziska
Top achievements
Rank 1
Franziska asked on 01 Sep 2011, 09:51 AM
Hello!

I was using a very old telerik library from 2009. Now I have upgraded (or I am trying) to use the newest telerik library.

Since I have upgraded to the latest internal build, I am having issues with the insert key on an empty GridView.
Everything works fine, but if I remove all items from the grid, I can not create a new one with the insert key.

It seems that its not a general GridView issue, because I have created a test application, where it works without any problems.
Probably its a combination with some containers which causes this odd behavior. I have tried to rebuild my container structure in my test application, but could not reproduce the problem.

I have tried to catch the insert key in the keydown event, but the key down event is not fired when the grid is empty.

Now comes the real odd behavior:
If there is a scrollbar in the GridView and I click an arrow in the scrollbar or click in the scrollbar (so that the bar jumps to that position), the insert key works! However, it does not work if I sort columns, move columns, click anywhere in or on the GirdView or even just drag the scrollbar.

Any ideas?

Many thanks,
Franziska

3 Answers, 1 is accepted

Sort by
0
Franziska
Top achievements
Rank 1
answered on 01 Sep 2011, 10:23 AM
Well.. I found the evildoer. Its the ScrollViewer!!!

So my next questions:

Why did it work with the old telerik version? I am still using the same .NET ScrollViewer version...
Is there an alternative to Microsoft's ScrollViewer??
0
Maya
Telerik team
answered on 03 Sep 2011, 09:13 AM
Hello Franziska,

Generally, we have introduce quite many improvements since the version you mentioned and unfortunately, I am not able to say what would be the reason for this to work back then and now.  
On the other hand, why do you need to define RadGridView in ScrollViewer ? Basically, it has a default once that will be displayed when necessary.
 

Kind regards,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Franziska
Top achievements
Rank 1
answered on 05 Sep 2011, 08:49 AM
I found a solution. If I set the Property Focusable="False" on the ScrollViewer, it works just fine so far. It seems that the standard value for this property is true.
Tags
GridView
Asked by
Franziska
Top achievements
Rank 1
Answers by
Franziska
Top achievements
Rank 1
Maya
Telerik team
Share this question
or