[Data Grid Reactive] Can we mark rows that fail to save?
Forge component by Bruno Martinho
Application Type

Say I have a datagrid and I have some added rows and edited rows.  GetChangedLines gives me all of those rows and I can save them.  But what happens when some rows fail to add, and some rows fail to save?  How can I mark those rows in the grid and indicate to the user that something is wrong with them?  



Hello @Greg Whitten ,

Thank you for raising this topic, we have been discussing this internally.

Can you please help and share with us, how do you see this implemented?

We currently have a client Action that returns the rows to add, edit and delete. Then you send them to server side and some of them have error.

How do you see the developer experience to warn the user about those errors? Are they outside the grid, like in a feedback message or do you see it in the grid. How do you think it would be easy, from the developer perspective to match the rows that had error in the server and the ones displayed in the data grid?

Hope to hear your feedback,

Bruno Martinho 


Hi Bruno,

I was imagining some way to mark rows inside the grid with a client side action.  Perhaps if there was some way to bind an id to each row, then the client action could mark rows as invalid.

For example, lets say there's a new Id column type that we can bind to the id attribute.  It would be a hidden column.  Then we call GetChangedLines and send our rows to the server for processing.  We keep track of the rows that fail server side and send a list of failed rows back.  Then we call a new client action to mark the failed rows as invalid. We pass it a json string that represents the list of our failed rows.  From that string it finds the row and applies a class to it.  Now that I've typed it out, maybe binding to id isn't the best approach since that neglects new rows.  Not sure what the best approach is, but somehow mark a line as invalid by passing back a subset of the ChangedLines.

Whatever the solution is, it could be extended too so that different styles could be applied for added, updated, and invalid rows.  Maybe the action takes three different json strings, similar to how GetChangedLines returns three different json strings.

I hope that answers your questions.  I'm open to hopping on zoom or something as well if you wanted to discuss the topic in a more collaborative medium.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.