Making a column / cell read only conditionally

2 posts, 1 answers
  1. Dineesh
    Dineesh avatar
    2 posts
    Member since:
    Apr 2010

    Posted 14 Nov 2018 Link to this post


    How to make a column or cell read only based on some conditions.

    I was exploring the CellFormatting event but cannot find how to achieve that.

  2. Answer
    Dess | Tech Support Engineer, Sr.
    Dess | Tech Support Engineer, Sr.  avatar
    4004 posts

    Posted 15 Nov 2018 Link to this post

    Hello, Dineesh, 

    In order to control the editing process and whether RadVirtualGrid should enter edit mode or no, you can handle the EditorRequired event and set VirtualGridEditorRequiredEventArgs.Editor property to null. Thus, the editor won't be activated. Otherwise, you can leave the default editor. In the event args you have access to the column/row index so you can determine whether to start editing or not.

    private void radVirtualGrid1_EditorRequired(object sender, Telerik.WinControls.UI.VirtualGridEditorRequiredEventArgs e)
         e.Editor = null;

    Note that most of the forum threads are reviewed by Telerik representatives and sometimes we address the questions asked by our customers in the forums as well. However, a post in the forum doesn't guarantee you a response from the Telerik support team. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread

    I hope this information helps.

    Dess | Tech Support Engineer, Sr.
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top