The radgrid below is a shorter version of the one I'm working on. I need to make "CYF_UNITS_JAN" ReadOnly by code behind.
Note the EditMode of the grid is Batch and EditType is Row.
How do you access the ReadOnly="True" property in code behind while the grid is being edited this way? I've tried a few methods but it doesn't seem to be working.
<telerik:RadGrid ID=
"RadGrid1"
runat=
"server"
AutoGenerateColumns=
"False"
DataSourceID=
"SqlDataSource1"
AllowAutomaticUpdates=
"True"
>
<MasterTableView DataKeyNames=
"ID"
DataSourceID=
"SqlDataSource1"
EditMode=
"Batch"
>
<CommandItemSettings ShowAddNewRecordButton=
"False"
ShowSaveChangesButton=
"True"
/>
<BatchEditingSettings EditType=
"Row"
/>
<Columns>
<telerik:GridBoundColumn DataField=
"ID"
DataType=
"System.Int32"
FilterControlAltText=
"Filter ID column"
HeaderText=
"ID"
ReadOnly
=
"True"
SortExpression=
"ID"
UniqueName=
"ID"
Visible=
"false"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"SalesPersonNo"
FilterControlAltText=
"Filter SalesPersonNo column"
HeaderText=
"SalesPersonNo"
SortExpression=
"SalesPersonNo"
UniqueName=
"SalesPersonNo"
Visible=
"false"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"ItemCode"
FilterControlAltText=
"Filter ItemCode column"
HeaderText=
"Item Code"
SortExpression=
"ItemCode"
UniqueName=
"ItemCode"
ReadOnly
=
"true"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"CYF_UNITS_JAN"
DataType=
"System.Int32"
FilterControlAltText=
"Filter CYF_UNITS_JAN column"
HeaderText=
"CY JAN"
SortExpression=
"CYF_UNITS_JAN"
UniqueName=
"CYF_UNITS_JAN"
DataFormatString=
"{0:n2}"
>
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField=
"CYF_UNITS_FEB"
DataType=
"System.Int32"
FilterControlAltText=
"Filter CYF_UNITS_FEB column"
HeaderText=
"FEB"
SortExpression=
"CYF_UNITS_FEB"
UniqueName=
"CYF_UNITS_FEB"
DataFormatString=
"{0:n2}"
>
</telerik:GridBoundColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>