This is a migrated thread and some comments may be shown as answers.

Previous value being used as default in New Grid Row Cell

1 Answer 12 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Gone2TheDogs
Top achievements
Rank 1
Veteran
Gone2TheDogs asked on 05 Oct 2017, 01:37 PM

Grid is cleared and then Loaded with data. User selects "new row" and the system puts them on a specific cell. User enters a value and TABS or ENTERS. Then does other tasks. User returns to the grid which is again cleared and then Loaded with data. The user selects "new row" and the system puts them on a specific cell, which is prepopulated with the previous value entered. 

>>> Would like not to have the new row cell pre-populated 

 

Steps:

1. Add a value to a cell (a) on a new grid row and commit it.

2. Perform other tasks on the form

3. Return to the Grid in (1) and open a new row. 

> The value from (1) is set as the default for the cell (a)

Although I clear the grid before repopulating, I haven't been able to remove this default (previous) value. 

 

Just before I Load the grid:  

dgvItems.Rows.Clear()

 

 

Any ideas how to prevent it from pre-populating? 

 

 

 

 

 

 

 

 

 

1 Answer, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 06 Oct 2017, 07:42 AM
Hello, Bob,  

Thank you for writing.  

Following the provided information, I was unable to reproduce the issue you are facing. Please refer to the attached gif file illustrating the behavior on my end with the specified version. I have attached my sample project. Could you please specify the exact steps how to reproduce the problem?

However, I can suggest you how to handle the obtained case. When you click the new row, the new row becomes current, the prompt text ("Click here to add a new row") is removed, and RadGridView enters its edit mode. This is the moment when the DefaultValuesNeeded event is fired. As the name of the event implies, it allows you to set the default values for the new row which, if unchanged by the end-user, are saved in the row when the new row is committed by the end-user.

I hope this information helps. Should you have further questions I would be glad to help.

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Gone2TheDogs
Top achievements
Rank 1
Veteran
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or