Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 78072

Radgrid BatchEdit and dynamically making fields ReadOnly

$
0
0
Hello Skip,

Since the RadGrid is defined declaratively it is recommended to set the ReadOnly property for the column in the markup:

<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}"ReadOnly="true">
</telerik:GridBoundColumn>


Alternatively you can handle the PreRender event for RadGrid and set the column as ReadOnly in the handler.

protected void RadGrid1_PreRender(object sender, EventArgs e)
{
    (RadGrid1.MasterTableView.GetColumnSafe("CYF_UNITS_JAN") as GridBoundColumn).ReadOnly = true;
}


Regards,
Viktor Tachev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.

Viewing all articles
Browse latest Browse all 78072

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>