Pass value of id in Kendogrid column's link


#1

Hi,
I have a json object which has different values. The json object is:

  • json = '{"Sensore": "'+ rev3 +'", "id_sensore": "'+ ids2[0] +'", "Misure_del_sensore": "'+ rev4 +'", "id_Misure_del_sensore": "'+ ids2[1] +'", "Tipo_di_sensore": "'+ rev5 +'", "id_Tipo_di_sensore": "'+ ids2[2] +'", "Facility_padre":"'+ rev6 +' ", "id_Facility_padre":"'+ ids2[3] +'", "Livello_2":"'+ rev7 +' ", "id_Livello_2": "'+ ids2[4] +'", "Livello_3": "'+ rev8 +' ", "id_Livello_3": "'+ ids2[5] +' ", "Livello_4":"'+ rev9 +' ", "id_Livello_4": "'+ ids2[6] +' ","Livello_5": "'+ rev10 +' ","id_Livello_5": "'+ ids2[7] +' ", "Livello_6": "'+ rev11 +' ", "id_Livello_6": "'+ ids2[8] +'"}';
    

Different variables have right values.
Now, I want pass some variables as id of Kendogrid column’s link. For example:
-“link”: “/enterprise/servicePoint/{{id_sensore}}”;

In this case, it doesn’t read the id_sensore value(value of this param exists). Does it exist a method which resolves it?


#2

You can make this json as a page record data source, then refer to it by
“link”: “/enterprise/servicePoint/{{ record.data.id_sensore }}”


#3

In “link”: “/enterprise/servicePoint/{{ record.data.id_sensore }}”, what is {{ record.data.id_sensore }}? How do I define ‘record.data’?
I don’ t understand this response.
I have forget to say that the json that I have obtained is the result of a function defined on a type.


#4

Define a data source on the page level like

"data": {
        "record": "DataSourceThatReturnsYourJSON"
    }

The page will be able to then reference record