Send customized values to a onRowSelected funcion.

Hello,

i need a function that shows an alert box with 2 values by clicking on a grid row.



I followed the doc., i made the function that show the alert box … ok …

but i don’t know how to give 2 contextual values to that function…



Ex.

By clicking on row1 the alert must show val1:a val2:b…

By clicking on row2 the alert must show val1:c val2:d…



theese values should be hidden… But if this is a problem a can show them on a cell…



any ideas?



Thanks. AL

Grid provides few ways to store hidden data
dhtmlx.com/docs/products/dhtmlxG … t_userdata

In case of attributes
<row id=“1” val1=“a” val2=“b” …
<row id=“2” val1=“c” val2=“d” …

It will look as


grid.attachEvent(“onRowSelect”,function(id){
alert(this.getRowAttribute(id,“val1”)+","+this.getRowAttribute(id,“val2”));
return true;
});

Thank for the quickly answer!
Just 2 things:
 - 1. I cannot find the property: getRowAttribute on API Documentation can you show me where I can find it?
 - unfortunatelly I make my grid in this way mygrid.addRow(3,variabile,3) etc…

Is there a method to setting a rowAttribute… also here I cannot find any docs…

Thanks in adavance, Al.

Ok sorry I read this…

dhtmlx.com/docs/products/dhtmlxG … t_userdata

TNX again, Al

    1. I cannot find the property: getRowAttribute on API Documentation can you show me where I can find it?
      Yep, while it was mentioned in separate article, main API reference miss description of such method - we will update documentation in nearest time.