Batch Edit Issue

2 Answers 24 Views
Grid
Jerry
Top achievements
Rank 1
Iron
Iron
Jerry asked on 17 Jun 2021, 03:03 PM

I have a radgrid with several rows.  I want to allow the user to edit specific rows but not others.  The other rows I need to calculate based on users input.  I have all this working but I need to figure out how to keep the user from having access to edit the rows that I am editing client-side based on there input.

Example (ASP.Net AJAX):
Rows 1-5 are editable by the user

Rows 6 and 7 are calculated based on 1-5 and I am doing the calculation client-side via OnBatchEditCellValueChanged event.

I need to some how disable the ability of the user to edit rows 6 and 7 without loosing the ability to to calculate and update via the event.

Can I use the event OnBatchEditOpening and set args.get_cancel(true) based on the user clicking in rows 6 or 7?  I have tried this but failed to get it to work.  If this is possible?  Please provide a sample of the script if so.

Thanks,

Jerry

2 Answers, 1 is accepted

Sort by
0
Accepted
Jerry
Top achievements
Rank 1
Iron
Iron
answered on 22 Jun 2021, 12:52 PM
I figured out my issue.  I could simply apply CSS pointer-events: none !Important; property to the fields that I do not want the user to have access to but I can still edit in script.
0
Attila Antal
Telerik team
answered on 22 Jun 2021, 09:12 AM

Hi Jerry,

We have two articles explaining how to conditionally cancel editing of cells when using EditMode="Batch"

Regards,
Attila Antal
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.

Jerry
Top achievements
Rank 1
Iron
Iron
commented on 22 Jun 2021, 12:51 PM

The issue I have with handling the fields that I do not want to allow editing in your suggestion is that you cant access the field to edit in the background. My requirement is to be able to edit in script for totals and such but not allow edit from the user. I did figure out how to go about this by applying additional CSS to each field using the pointer-events: none !Important; property to those fields.
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Iron
Iron
Answers by
Jerry
Top achievements
Rank 1
Iron
Iron
Attila Antal
Telerik team
Share this question
or