RadGrid for ASP .NET version
RadControls for ASP .NET AJAX version |
3.0.3 and later
2008.1.415 and later
|
.NET version |
1.x (RadGrid for ASP .NET)
2.0 and later (RadControls for ASP .NET AJAX)
|
Visual Studio version |
2002/2003 (RadGrid for ASP .NET)
2005 and later(RadControls for ASP .NET AJAX)
|
Programming language |
C#
|
Browser support |
all supported by RadGrid for ASP .NET
all browsers supported by RadControls for ASP .NET AJAX
|
Here are the steps you need to undertake to disable the editor for a certain field when some custom conditions are met:
- subscribe to the ItemDataBound handler of the grid
- check whether the currently bound item is in edit mode
- retrieve the value for the edited field which will be used as a flag for enabling/disabling the column editor
- if the value matches the condition, disable the editor field (you can get reference to it through the auto-generated column editor)
In the example we are enclosing, the editor for the ContactTitle will be disabled when you edit the first grid row. Note that you can hide completely the editor when setting its Visible property to false.