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

Row Details Editing

3 Answers 149 Views
GridView
This is a migrated thread and some comments may be shown as answers.
James Morgan
Top achievements
Rank 1
James Morgan asked on 15 Jul 2013, 02:53 PM
Hello,

I have GridView that has a RowDetailsTemplate specified.

I am trying to figure out how to force the row in a GridView into Edit Mode when the user is editing a property that is displayed in the Row Details template of that row.  The GridView properly goes into Edit Mode when I edit a cell in the row, but not when I am in the Row Details.

Any help is appreciated.

Thanks.

James

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 16 Jul 2013, 10:56 AM
Hi James,

When you start editing the details row, then you could invoke a BeginEdit for its parent GridViewRow.
For example:

private void detailsGrid_BeginningEdit_1(object sender, GridViewBeginningEditRoutedEventArgs e)
{
   (sender as RadGridView).ParentRow.BeginEdit();
}

How does this work for you?
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
James Morgan
Top achievements
Rank 1
answered on 17 Jul 2013, 06:27 PM
Hi Didie,

I was able to get that working.  Thank you.

I bound a command to the GotFocus event and was able to make the Grid View row go into Edit Mode.  Now I have another problem, where when this occurs, the focus leaves my current control and moves to the first editable column in the Grid View.  I would like to keep focus on the control I was just on.  I have passed the current control as a parameter and called Focus() on it, but the focus won't leave my first editable column.  The first column in this case would be a GridViewComboBoxColumn.

Any ideas?

James
0
Dimitrina
Telerik team
answered on 18 Jul 2013, 09:09 AM
Hello James,

What is the result if you place the first column to be not a GridViewComboBoxColumn, but a GridViewDataColumn? Would you also try to invoke GridView.CommitEdit before setting the focus for the control?

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
James Morgan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
James Morgan
Top achievements
Rank 1
Share this question
or