I like to highlight one cell per row then get the highlighted cell and set a value to another cell on the same row.
for Question 1 ,A is selected so if that's the correct answer then "Raw score" column has to be set to 1
user can only one of A,B,C,D or No answer per row.
is this possible?
Thanks
Faz
1 Answer, 1 is accepted
0
Accepted
Nikolay
Telerik team
answered on 21 Apr 2022, 09:31 AM
Hi Faz,
Is the Grid configured for incell editing? If this is so you can use the cellClose event handler to update the Raw Score model property depending on another model property using the set() method. For example:
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Decided to implement checkbox to achieve this, however I'm not sure how to get currently editing row on checkbox click event.
I have to find eg: when B is clicked then find if C also is checked or not. for each row I need to do this and update a column on the same row depending on the combination.
functiononAnswerClick(me) {
var grid = $("#AnswersGrid").data("kendoGrid");
var row = $(this).closest("tr");
var dataItem = grid.dataItem(row);
console.log(row)
console.log(dataItem) <---- Is Null
}
dataItem is returning null so I cannot check other columns on the row.
Can you please let me know how this can be achieved?
Thanks
Faz
Nikolay
Telerik team
commented on 29 Apr 2022, 02:19 PM
Hi Faz,
I recommend utilizing the approach demonstrated in the following article: