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

Row cancel won't fully cancel

9 Answers 38 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Benedikt asked on 10 Sep 2019, 11:49 AM

Hey,

I have the problem with a gridview. When I cancel the Rowedit with pressing 'Esc' two times the row not fully cancels. As you can see in my video.

(https://www.dropbox.com/s/ctpiyfsq0v3vyx2/Record100919.wmv?dl=0)

The previously in the same row entered value is still visible. As soon as you click in the cell, it disapears. If  I not click into it and change another cell, it even writes the before cancelled value into the cell.

 

I not have something really special there. The radgridview itemsource is a Datatable set in C#:                

rgvTeile.ItemsSource = Daten.GibTeileWithReklamationsID(aktReklamationsID).DefaultView;

 

This is my radgridview:

                            <telerik:RadGridView
                                Grid.Row="3"
                                x:Name="rgvTeile"
                                Margin="0 10 0 0"
                                AutoGenerateColumns="False"
                                GroupRenderMode="Flat"
                                ShowGroupPanel="False"
                                FilteringMode="Popup"
                                ShowSearchPanel="False"
                                ValidatesOnDataErrors="InEditMode"
                                EnableColumnVirtualization="False"
                                NewRowPosition="Bottom"
                                HorizontalAlignment="Left"
                                RowEditEnded="RgvTeile_RowEditEnded"
                                ActionOnLostFocus="CommitEdit"
                                >
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding ID}"
                                        Header="ID"
                                        IsVisible="False"
                                        IsReadOnly="True"
                                        />
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding Menge}"
                                        Header="Menge"
                                        />
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding Bezeichnung}"
                                        Header="Bezeichnung"
                                        />
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding ArtikelNummer}"
                                        Header="ArtikelNummer"
                                        />
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding Farbe}"
                                        Header="Farbe"
                                        />
                                    <telerik:GridViewDataColumn
                                        DataMemberBinding="{Binding Fertigmaß}"
                                        Header="Fertigmaß"
                                        />
                                </telerik:RadGridView.Columns>
                            </telerik:RadGridView>

Greetings

Benedikt

9 Answers, 1 is accepted

Sort by
0
Ivan Petrov
Telerik team
answered on 12 Sep 2019, 08:30 AM

Hi Benedikt,

Thank you for writing.

I tried to reproduce the behaviour you have described and filmed but I was not able to. I have created a sample project with the code you have provided and a ViewModel that I reverse engineered from your code snippet. What I think I am missing is the data type of the view model of ArtikelNummer. Also how and where are you validating the user input? I have attached the project I created so you can edit it so it would represent your actual setup. Once you can reproduce the behaviour in the sample project send it back to me so I can diagnose it and give you an accurate response specific to your case.

Looking forward to your reply.

Regards,
Ivan Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
answered on 12 Sep 2019, 09:38 AM

Hi Ivan,

 

I tested your project and yes it works as expected. I was no with that able to get more to source of the problem: It has something to do with the fact my itemsource is a Dataview of a Datatable.

 

I have modified your project and added an empty Datatable and added the columns in code as they would be from my sql-database.

And the same error occurs. In the addingprocess of the first row everything cancels right. But once it is added and modified again the cancel doesnt fully cancel.

https://www.dropbox.com/s/fd8pt66gydz98vb/GridViewTestProject.zip?dl=0

 

Here is again a video what I do:

https://www.dropbox.com/s/lqccd6xs9nnn4ox/Record1.wmv?dl=0

 

Ah and the Artikelnummer is a string, or better nvarchar(255) in the database.

The validation happens through the DatTable-Logic and there are no real restrictions in what is allowed, it's a semi free text field.

0
Accepted
Ivan Petrov
Telerik team
answered on 16 Sep 2019, 01:05 PM

Hi Benedikt,

Thanks to the updated project I was able to reproduce the issue you have run into. Indeed the values of the cells that are displayed in the grid are not updated properly. I have logged this issue in our feedback portal. You can track its progress and subscribe for status change alerts on the following link - Canceling the edit of an entire row does not update the grid properly when bound to a DataView.

I have also updated the test project with a workaround. The workaround involves forcing the update of the cells when the editing of the row is cancelled. Since the API for this is private it necessitates the use of reflection. 

I have also updated your Telerik Points for reporting this issue.

I hope this is useful. Should you have further questions, I would be happy to help.

Regards,
Ivan Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
answered on 17 Sep 2019, 05:34 AM

Hi Ivan,

thanks for logging the issue.

I have tried to download your project with the workaround but get an error by clicking the link: Oh, no!
It seems we've lost this page.

Could you try to upload the project again.

 

Thanks and regards,

Benedikt

0
Ivan Petrov
Telerik team
answered on 17 Sep 2019, 07:11 AM

Hi Benedikt,

I have attached the project to this message as well.

I hope it works properly this time.

Regards,
Ivan Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
answered on 17 Sep 2019, 08:57 AM

Hi Ivan,

sadly the same error :/

 

Greetings Benedikt

0
Ivan Petrov
Telerik team
answered on 18 Sep 2019, 09:09 AM

Hi Benedikt,

This is indeed strange. I have notified the team that works on the forum and they are looking into the problem. I will notify you when I get any results from them.

Regards,
Ivan Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Ivan Petrov
Telerik team
answered on 18 Sep 2019, 12:58 PM

Hi Benedikt,

Third time's a charm.

Regards,
Ivan Petrov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
answered on 23 Sep 2019, 05:57 AM

Hi Ivan,

 

Now the download works, but you added the wrong file, its unmodified. 

But I can now download your first answer and marked it as the answer, because there it is modified and with your solution everything works as it should :)

 

Greetings and thank you from Germany,

Benedikt

Tags
GridView
Asked by
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Ivan Petrov
Telerik team
Benedikt
Top achievements
Rank 3
Iron
Iron
Iron
Share this question
or