dfaruque / Serenity.Extra

Name of the repo says that this is an EXTRA of http://serenity.is platform
60 stars 34 forks source link

Inline Editor Query #24

Closed mustafalotiya closed 5 years ago

mustafalotiya commented 5 years ago

Hi

I'm looking for additional functionality for Grid inline editor.

I have Product Budget Grid with Draft, Submitted, Approved and Rejected. Status. I want user can modify only budget with Draft status.

Is there any functionality available for same. Please provide sample if you have any.

Thanks in Advance.

dfaruque commented 5 years ago

the following event might help return false if you do not want to edit

        this.slickGrid.onBeforeEditCell.subscribe((e, args) => {
            let item = args.item as OrderDetailRow;
            let row = args.row as number;
            let cell = args.cell as number;
            let column = args.column as Slick.Column;

             if (item.ProductDiscontinued == true)
                    return false;
        });
mustafalotiya commented 5 years ago

It's worked. Thank you dfaruque. Appreciate your prompt reply. Thanks.