How to add more columns to listview

hi ,
normally listview takes 2 parameters as extra columns but i need to add more
i tried to add them form making the docfield in list view , but it doesn’t show then i try to add it in the
doctype_list.js
colwidths: {“status”:2,“from_date”: 2,“to_date”:2,“employee_name”:2,“leave_type”:2},
but it doesn’t edit it out ,
and finally i tried to edit the columns , and it didn’t change any thing ?

I believe, listview only allows 3 columns… What I can suggest is that you create a field that will have the 2 fields already (string type is suggested) ex. that field will have from_date/to_date

@johnskywalker
Thank you for the advise.
But I have question: how to remove the status column from the list view? I checked the fields if it contains document_status or status and I did not find it.

Regards
Bilal

Adding more columns is possible via list_render.js as in the below link (search for list_render.js as the link is talking about another topic) and thanks a lot for @joelios:

Regards
Bilal

1 Like

can you elaborate with step by step procedure for adding more columns to list view

@vimal0777


Posts in this thread are as step-by-step as it goes.

My request is: since I hate making changes to code base, and this has been asked about numerous times, could the number of columns perhaps be changed to a setting instead of being hard-coded?

1 Like

I am proposing to add new feature to support multi version of layout per list / report view, but not enough feedback yet.

All the problems of the customization will be resolved if erpnext (or frappe) has Overwrite or Inheritance capabilities. So instead of being worry about the overwrite when doing upgrade, you can customize whatever you would in the script by separated file and using Inheritance and Overwrite. Really I do not know if this is possible in ERPNext.

Regards
Bilal

2 Likes