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

readonly on edit mode

1 Answer 109 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ronald
Top achievements
Rank 1
ronald asked on 01 Feb 2011, 02:29 AM
Hi,

How do i make the cell readonly while in edit mode but not when the user inserts a new row?

thanks

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 01 Feb 2011, 08:48 AM
Hello ronald,

You may handle the BeginningEdit event as follows:

private void playersGrid_BeginningEdit(object sender, GridViewBeginningEditRoutedEventArgs e)
{
        if (this.playersGrid.Items.CurrentAddItem != e.Row.Item)
        {
            e.Cancel = true;
            return;
        }          
}
 

Best wishes,
Maya
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
GridView
Asked by
ronald
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or