Insertion of row allowed but update of row not allowed

1 Answer 45 Views
GridView
Shubham
Top achievements
Rank 3
Iron
Iron
Iron
Shubham asked on 25 Jan 2024, 01:59 PM
Hi,

I want to have functionality that user can add row in a grid but cannot update the existing data in a grid how we can do.
hope you understand my requirement.

i.e. Row Insert Allowed but update not allowed.

Thanks,
Shubham Jain

1 Answer, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 30 Jan 2024, 09:57 AM

Hello, Shubham,

If you want to have functionality that user can add new rows you can use the AllowAddNewRow property to true. Please refer to the following article for more information: New Row - WinForms GridView Control - Telerik UI for WinForms 

If you do not want the user to update an already added row you can handle the CellBeginEdit event and cancel it when you need. The GridViewCellCancelEventArgs allows you to cancel the edit operation by setting the Cancel argument to true. Thus, considering the row/column and row index/ column index, it is possible to restrict entering edit mode in certain cases. More information about the editing lifecycle is available here: Editing Lifecycle - WinForms GridView Control - Telerik UI for WinForms

I hope this infromation is useful. Should you have any other questions do not hesitate to contact me. 

Regards,
Nadya | Tech Support Engineer
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
GridView
Asked by
Shubham
Top achievements
Rank 3
Iron
Iron
Iron
Answers by
Nadya | Tech Support Engineer
Telerik team
Share this question
or