[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 121
  • Last Modified:

C#: add a non-editable field telerik

i want to add a non-editable field box in a telerik form. I have the following.

 <telerik:GridBoundColumn DataField="code" EditFormColumnIndex="0" HeaderText="Code" />
 
 however, this displays an editable box. if i do readOnly. it disappears all together
 
  <telerik:GridBoundColumn DataField="code" EditFormColumnIndex="0" HeaderText="Code" ReadOnly="true" />
0
badtz7229
Asked:
badtz7229
  • 2
1 Solution
 
Easwaran ParamasivamCommented:
Remove  EditFormColumnIndex="0"
0
 
badtz7229Author Commented:
@Easwaran Paramasivam : that didn't work. it still is editable.

i did find a solution:
in my _ItemDataBound function
            GridEditFormItem editFormItem = (GridEditFormItem)e.Item;
            TextBox TextBox1 = (TextBox)editFormItem["code"].Controls[0];
            TextBox1.Enabled = false;
0
 
badtz7229Author Commented:
it resolved issue for me.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now