Dear @pithiya_Nilesh ,
To display more fields in the child table within your Frappe dialog, you can adjust the column width and ensure that the fields are properly configured.
Here are some steps you can follow…
-
Adjust Column Width - Ensure that the columns are not too wide. You can set the width of each column to make sure more columns fit into the view. This can be done by setting the width
property for each field in the child table.
-
Check Field Configuration - Make sure that the “in_list_view” property is set to 1
for the fields you want to display. It seems you have already done this, but double-check to ensure there are no typos or misconfigurations.
-
Custom CSS - If the above steps do not work, you can use custom CSS to adjust the layout and ensure more columns are visible. Add a custom CSS class to the dialog and define the styles accordingly.
let d = new frappe.ui.Dialog({
title: 'Enter details',
fields: [
{
fieldname: 'child_table',
fieldtype: 'Table',
label: 'Child Table',
in_place_edit: true,
fields: [
{ fieldname: 'field1', label: 'Field 1', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field2', label: 'Field 2', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field3', label: 'Field 3', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field4', label: 'Field 4', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field5', label: 'Field 5', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field6', label: 'Field 6', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field7', label: 'Field 7', fieldtype: 'Data', in_list_view: 1, width: '10%' },
{ fieldname: 'field8', label: 'Field 8', fieldtype: 'Data', in_list_view: 1, width: '10%' }
]
}
],
size: 'large',
primary_action_label: 'Submit',
primary_action(values) {
console.log(values);
d.hide();
}
});
d.show();