Make a DataGrid Editable or Read-Only based on Security Rights RRS feed

  • Question

  • Is there any way to toggle a DataGrid between Editable and Read-Only based on security or would it be necessary to make two separate versions of the screen. I know I can make the DataGrid Read-Only and control edits through the Modal pop-up edit window but for this application it makes for sense to be able to make the edits in-place.

    Friday, April 12, 2013 3:14 PM


  • Sure, LS is really great.   You can take an entire Row or Column Layout and make it read only.

    It is a good practice to embed all Grids in Row or Column Layouts.

      this.FindControl("ScreenLayout").IsReadOnly = true;

    In fact, the top "ScreenLayout" Row Layout can me the entire screen ReadOnly.   Keep in mind that you will still need code to disable some buttons on the screen.

    Garth Henderson - Vanguard Business Technology

    • Marked as answer by Steve Anger Sunday, April 14, 2013 1:36 AM
    Friday, April 12, 2013 5:06 PM