Disabled WebGrid allowing input

5 replies. Last post: October 19, 2010 11:13 PM by Yudi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Shawn AugustMember

I have a WebGrid using BatchUpdate and need a way to prevent the user from entering input. The WebGrid's "Enabled" property prevents the user from clicking into a cell and entering data. However, if the Grid has focus the user can still enter data into the cells. They cannot click on a cell and enter but they can tab from cell to cell and use the keyboard.


Also, is there a way to update the Grid's UI to show the Grid is disabled via JavaScript?

   function <%=this.ClientID%>_SetEnabled(isEnabled) 
    { 
        try
        {
            // Enable/Disable
            var treatyClaimsGrid = ISGetObject("<%=this.grdTreatyClaims.ClientID%>");
            if (treatyClaimsGrid == null) { return; }
            if (isEnabled == false) 
            { 
                treatyClaimsGrid.UndoAllChanges();                 
            }
            treatyClaimsGrid.Enabled = isEnabled;            
        }
        catch (ex) { ShowJSException(ex); }
    }
All times are GMT -5. The time now is 12:56 AM.
Previous Next