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

No 'IsEditable' property in GridViewRowInfo ?

3 Answers 124 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Steve R.
Top achievements
Rank 1
Steve R. asked on 09 Nov 2010, 05:34 PM
Hello,

I'm testing the RadControls for WinForms for a new project (we plan to upgrade to "Premium Collection for .NET" when we will renew our subscription for RadControls for ASP.NET Ajax license before november 20th).

I'm using 2010.2.10.914 trial version in a project in VB.NET targeting framework 4.

In a data edition scenario, I would like to programmatically prevent some rows from being edited. For this purpose, I want to set 'IsEditable' property to false, but I cannot find this property on GridViewRowInfo.


Please find attached to this post a screen capture showing that this property is not available in Intellisense.

Am I doing something wrong ? What's the recommanded way to programmatically lock some rows (not all) in an editable grid view ?

Thanks in advance !

3 Answers, 1 is accepted

Sort by
0
Accepted
Emanuel Varga
Top achievements
Rank 1
answered on 09 Nov 2010, 08:21 PM
Hello,

Sadly there is no such property, but you could handle the CellBeginEdit event, and based on a condition cancel editing, like so:
void radGridView1_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
{
    if (e.ColumnIndex == 1 && radGridView1.CurrentCell.Value == "some value")
    {
        e.Cancel = true;
    }
}

Hope this helps, if you have any other questions or comments, please let me know,

Best Regards,
Emanuel Varga
0
Steve R.
Top achievements
Rank 1
answered on 10 Nov 2010, 09:48 AM
Hello,

thanks for your help, I have tried this solution and it's OK for me.

Maybe will this IsEditable property added in a future version of RadForms.

Best regards,

Steve.
0
Emanuel Varga
Top achievements
Rank 1
answered on 10 Nov 2010, 10:23 AM
Glad to be able to help,

If you have any more questions please just let me know, and if the question has been solved, please mark the question as answered, so that others can find the answers to their questions faster.

Best Regards,
Emanuel Varga
Tags
GridView
Asked by
Steve R.
Top achievements
Rank 1
Answers by
Emanuel Varga
Top achievements
Rank 1
Steve R.
Top achievements
Rank 1
Share this question
or