Customize Grid Table

I want to create a new doctype as below

so I’ve tried creating a new doctype and child table for my doctype

but I have a problem,
I want to add more than 10 columns in the child of this table, and resize this coloumn field

Could you guide my how to implement it?
or do you have any solution with my problem ?

Thank you

Try by adding width to child table field in px. e.g. 10px

image

1 Like

Thank you for your answer Sangram,

i’ve tried adding width to child table

but it’s still doesn’t work

@Effendy_Rizal try to change columns number not width give to each 1 and check grid view

As far as I know, that column can only be filled up to 10 fields.

Salam

hello so what is the solution to facing that problems? can you help?

or anyone… thank you

Hey @billyjoeswanto , consider an implementation of frappe’s datatable instead. This is starting to be supported natively in Frappe/ ERPNext but with all the rollup and yarn issues going around lately, you may have some trouble with infrastructure. Try downloading the zip and looking at their index.html example; it’s pretty good.

1 Like

Is there a way to work with datatable directly inside a document? For example, in Quotation, quotation items would render in “datatable”, instead Frappe table :slight_smile:

Oh boy, I really hope there’s a hack for it.

To migrate any/each child table to Datatable would require individual effort per-child-table. So ‘just a hack’ is too optimistic, unfortunately. There’s also a UI/UX argument that switching somethign that is clearly a form input in the Frappe context to something that is typically a report view (implying that it is not editable) is not great, but maybe not a deal breaker. Also, while Datatable could theoretically accommodate all the input types that Frappe’s field group has, they’re not the same and the list of mismatches is longer than one would think.

I have long thought about it, have looked for other workarounds and smaller hacks for the current need :slight_smile: and figured that Datatable is to be the best hack for it. It’s built in, it’s being called and rendered and being used inside ERPNext etc.

Anyways, your input is very valid but I’m sure some arguments can be made against it :sweat_smile:

Thank you for the input though :slight_smile:

Yeah, it’s totally about need… your arguments in favor are valid too.
If there were a clear-cut case where you’d want to be able to see and/or edit > 10 columns and dozens of rows, that’s a good case for Datatable. Frappe’s UI design has generally shied away from this kind of thing and favors limiting the things a user needs to look at. Whether you like that or not, it’s the design idiom so one needs to chose to break out of it with consideration. The biggest knock against any Datatable / spreadsheet is that it isn’t mobile (phone) friendly and leans into keyboard-based user input over mouse and touch.

True. But a client of mine works with more than a hundred lines of items, and each item might have a different selling currency (yes, each line item does have its own currency by custom work), and an uncertain weight, each has a different shipping rate etc. When you have that many items with so many variables in a single Quotation, a need raises for a Datatable view for a “big picture” of the quote :slight_smile:

I really hope it gets implemented in the future :slight_smile: