I have a processs that will add a row to my RadTreeListView hierarchichal data source.
If I have a reference to the item I added, how do I scroll the item into view and force the first cell of its row into edit mode ?...
Many thanks - Paul.
3 Answers, 1 is accepted
0
Vlad
Telerik team
answered on 31 Aug 2011, 07:48 AM
Hi Paul,
You can use ScrollIntoView/ScrollIntoViewAsync methods to scroll into view particular item and if set this item as CurrentItem you can call BeginEdit() to achieve your goal with first cell editing.
Best wishes,
Vlad
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 >>
This works... almost... We are adding the new row from a right-click context menu and everything works fine as per your suggestions...
however...
The final problem is this; if the user was previously editing another row and they were in column 6 when they right clicked and added a new item, the "BeginEdit" call on the new item causes them to go to column 6 of the new row.
The desired functionality is always to edit the specific column 0 of the newly added row and not to drop into the column they previosuly had in focus - can we do this - is there some kind of "CurrentColumn" value ?...
Many thanks - Paul.
0
Nedyalko Nikolov
Telerik team
answered on 03 Sep 2011, 10:00 AM
Hi Paul,
Indeed there is such property, which you could use. Just set CurrentColumn before BeginEdit(). Another approach is to call BeginEdit() method on the desired GridViewCell object. I'm pasting a code snippet for a reference:
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 >>