igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

igxGrid Row edit

Open Eralmidia opened this issue 8 years ago • 25 comments

Description

I guess you may already be working on this, as it's possible in the old ig grid, but I would really like to see "row mode" in the igx-grid.

Result

Can only select / edit one cell at a time.

Expected result

Ability to select a row and show editors for all cells in the row at once when editing.

Eralmidia avatar Feb 09 '18 13:02 Eralmidia

@Eralmidia yes we have it planned and I will let you know once the feature is scheduled to be ready :)

SlavUI avatar Feb 12 '18 07:02 SlavUI

I guess this can be closed, as it is handled in #812 ?

Eralmidia avatar Apr 03 '18 09:04 Eralmidia

@Eralmidia this is not the same behavior as #812. The latter is related to selection, which is not quite the same as editing all the cells for one row at once, which will require additional logic and UI. If you select a row in #812 it as added to a selected collection, its style is changed, but the row does not enter edit mode. This will bе a future and a different implementation. Thank you!

Lipata avatar Apr 03 '18 10:04 Lipata

Ah, yes, that makes sense. Thanks for the response. Any change this will make in into 5.4? It seems to me, that with the grid improvements coming in 5.3, this may be the last thing we need in order to start using this component in production.

Eralmidia avatar Apr 03 '18 11:04 Eralmidia

@Eralmidia We're still considering whether editing should be performed cell-by-cell, or the whole row should be editable. The alternative we're considering is external form to edit the whole row, because we need to be handling data-dense scenarios with lots of columns (200+), in which case the whole grid is horizontally virtualized and row editing is out of the question.

kdinev avatar Apr 03 '18 11:04 kdinev

Thanks for the input. I guess there are use cases for all of these options. An "excel-like" editing, a regular row editing and the form style for massive grids. If it is cell by cell, I do hope that you can include the option to have commit/cancel buttons for the row, to delay commit of data, even though the data is technically entered cell by cell. In the old grid, we are exclusively using row editing in all grids. I'd imagine this would be the most common generally, for all kinds of entities. Users, roles ect.

Eralmidia avatar Apr 04 '18 05:04 Eralmidia

Any chance this will be a part of milestone 3?

Eralmidia avatar Apr 30 '18 08:04 Eralmidia

@Eralmidia We've still not gotten to discussing and designing the row editing pattern. There's a very slim chance that this will make it in for June. We may get some progress on the design though.

May I edit the issue title to be only row edit, because the row selection is done as per #812?

kdinev avatar Apr 30 '18 08:04 kdinev

@kdinev Ok, keep me posted. There are only a small number of tables we can implement the igx grid at currently, without any editing features.

Changing the title seems logical, yes :)

Eralmidia avatar Apr 30 '18 09:04 Eralmidia

@Eralmidia We're working on enhancing the cell editing behavior and introducing row editing with that.

https://github.com/IgniteUI/igniteui-angular/wiki/Cell-Editing

Take a look at the Tab key behavior - the cells will be in edit mode one at a time, but Tab moves horizontally in the row, putting the next editable cell in edit mode. Let us know what you think!

kdinev avatar May 28 '18 13:05 kdinev

Yes, I think that continuing down the path of cell editing is logical from a technical perspective. What I'm wondering, is whether there will be a layer of "row logic" on top of the cell editing?

In the old ig grids, we have row mode, which edits the whole row, and then commit with a done/cancel button. For instance, if you have a grid of users, we would like to commit the changes for a User model to the server as a whole, not one API call for edit of email, one for username ect.

So maybe there could be something in the grid containing the edit state of the row, and delay the commit for the whole row until confirmed by the user (done/cancel), even though the row technically are edited on a per cell basis?

Eralmidia avatar May 29 '18 08:05 Eralmidia

@Eralmidia I apologize for delay to respond to your question. You probably see that there's a lot of features that we're pushing at the moment, so I was busy with the other ones.

It's very hard for us to do a design where we spawn all the editors simultaneously, with done and cancel buttons, like in the classic Ignite UI igGrid. The most difficult part would be virtually scrolling the grid horizontally and spawning new editors. This is actually also not supported in the igGrid (horizontal virtualization and row editing). We may explore how to do this later this year.

Btw, once again I want to thank you for all the support and feedback you provide us with for this product!

kdinev avatar Jun 13 '18 15:06 kdinev

Yes, I do understand the difficulties regarding the editors. What I was proposing was more in the lines of the following:

You edit a single cell at the time, so only one editor is shown at a time. But when a cell in the row is edited, mark the row as "dirty". Visually maybe as simple as a change of color of the row or something. Then show done and cancel buttons for the edited row. If done is pressed, emit an event for row edit, if cancel is pressed, roll back the changes done to all cells in the row. That was kinda what I meant by "adding some row logic" on top of what is essentially still cell editing. So essentially, the grid should be able to more or less work as in "cell mode", with the exception that you store edited values until done or canceled.

I don't know the inner workings of the grid of course, but it seems to me that it should be possible to use a single editor, but still give the user the feeling that they are editing a row.

No problem. Let me know if I become to nagging ;) In the end, I'm just trying to provide the best user experience for our customers, just like you do. Looking forward to the next release, especially to see the features of the combo/select component. Keep up the good work.

Eralmidia avatar Jun 14 '18 07:06 Eralmidia

@Eralmidia You're not at all nagging. @StefanIvanov @SDinev Can you take a look at the suggestion and see how we can implement a design for this?

kdinev avatar Jun 14 '18 07:06 kdinev

@Eralmidia Do you mind if you give me your email address? You can send me a message at [email protected] or on twitter (at)KonstantinDinev

kdinev avatar Jun 26 '18 07:06 kdinev

Sure, sent you a mail now :)

Eralmidia avatar Jun 27 '18 06:06 Eralmidia

row edit

@Eralmidia @kdinev the design team is signing off this design for the row edit

StefanIvanov avatar Sep 12 '18 12:09 StefanIvanov

Looks good to me.

Btw, will there be inputs to customize the text of revert and submit? Say we have a grid where you enter users, and would like it to have a more descriptive text, like update user, instead of submit row ect.

Eralmidia avatar Sep 14 '18 06:09 Eralmidia

The button names are not finalized yet, and most probably they will be "Done" and "Cancel". We will also have templates that will allow defining custom buttons.

Lipata avatar Sep 14 '18 07:09 Lipata

We are making some final tweaks and later today a slightly updated design will be shared. As @Lipata said the buttons will be customizable through a template and the titles you see on the screen shot are the default label values.

StefanIvanov avatar Sep 14 '18 08:09 StefanIvanov