--- title: "Disabling fields based on data on specific fields" slug: "disabling-fields-based-on-data-on-specific-fields" updated: 2024-01-12T09:14:07Z published: 2024-01-12T09:14:07Z canonical: "help.pillir.io/disabling-fields-based-on-data-on-specific-fields" --- > ## Documentation Index > Fetch the complete documentation index at: https://help.pillir.io/llms.txt > Use this file to discover all available pages before exploring further. # Disabling fields based on data in another field Q: I need to display a table with three columns. Based on the data entered in column A, column B and Column C must be enabled / disabled. How do I design for this requirement in the App Designer? A: This requirement belongs to the "form validation" category and can be designed in multiple ways. Since it is tabular data, the following usecase uses a **Datagrid** component to display the data and a **Dialog box** component to set the validations. This approach facilitates efficient handling of tabular data while allowing customization of validations through the Dialog box component. ## Sample Usecase Based on user ID, the Name and Description fields will either be enabled or disabled. Subsequently, the user-entered data will be displayed in a table format. **Steps** 1. Drag and Drop a **Datagrid** component to the **DemoPag**e component. Modify properties as below: - Selection - Row Selection - Columns - 3 - Data - Map to table variable **GetDetails** (created in "Add Variable" section)![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/1.png) 2. Click the **Header** cell. Modify properties as below: - Label - Name - Editable - Disable - Data - **GetDetails.Name![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/2.png)** Repeat the above step for all header cells and map to related variables. 1. Add a **Dialog box** component to the page. ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/3.png) 2. Modify the component to have 3 Text input components. This will correspond to the 3 columns of the datagrid. 3. Modify the properties as shown in the image. Add the related variables. | ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/4(1).png) | ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/5.png) | ![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/6.png) | | --- | --- | --- | 4. Click the **Save** button within the Dialog box. Add the following interactions:![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/7.png) 5. Click the **Cancel** button within the Dialog box. Add the following interactions:![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/8.png) 6. Add a "**Add**" button below the Datagrid. Add the following interactions:![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/9.png) **Adding the Logic** In the database create a Table **DetailsData** with Id, Name, and description as columns.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/10.png) Add a BOS(Get Details) to the DemoPage. This BOS retrieves the data from DetailsData database table.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/11.png) Add another BOS(Insert) to the DemoPage. This BOS inserts the user entered data to DetailsData database table.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/13.png) **Adding Behaviors** Add an onPageShow event to the DemoPage. Add logic as in image. This logic will retrieve the data from the database table and display in the datagrid.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/14.png) Add the following logic for the ID text input field inside the Dialog component. This logic validates the user-entered ID and enables/disables the fields.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/15.png) Add the following logic to the Save button inside the Dialog component. This logic inserts the user-entered data in the database table and prints a success message.![](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/16.png) After designing the App, preview it to check the build. <> [Video](https://cdn.document360.io/718af901-247b-46be-8ace-83da21839237/Images/Documentation/Final2.mp4) ## Point to Remember Avoid customizing the Datagrid component for validations like enabling/disabling cells based on other cells. This implementation will require adding more logic to the component. Instead, use components like Dialog boxes to add validations to the data. Transfer the validated data to the Datagrid for display. NoteIn the upcoming EdgeReady platform releases, we aim to enable addition of validations directly within the Datagrid component.