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

[Solved] Put Cell into Edit Mode

1 Answer 162 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian
Top achievements
Rank 1
Brian asked on 06 Oct 2011, 10:47 PM
Is there a way to automatically or programmatically put a cell into edit mode without needing to click, etc. on the cell?

I have a RadGridView with three columns, two with text, and a third with an Edit button.  I would like the text to be read-only until the edit button is clicked, in which case the 2nd text column becomes editable.  So far, I think I can do this, but I would like to make it obvious to the user that the 2nd text column is editable after they have clicked the Edit button.  It seems like the cell only goes into edit mode when directly clicked on.  Is there a way that I can force it into "edit" mode?

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 07 Oct 2011, 06:49 AM
Hi Brian,

You could try something like follows:

private void RadButton_Click(object sender, RoutedEventArgs e)
        {
            this.clubsGrid.Columns[0].IsReadOnly = false;
            this.clubsGrid.CurrentColumn = this.clubsGrid.Columns[0];
            this.clubsGrid.BeginEdit();
        }

However, if you want to return the read-only state of the column, you need to handle CellEditEnded event for example and change the IsReadOnly property of that column back to "True".
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Brian
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or