Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by ouyang on Jul 23, 2008 23:48
open dhtmlx forum
how to set alternative text when I drag and drop a row in dhtmlxgrid?

Hi there,
Here is my case 1: first column in dhtmlxgrid is an image link, the other columns are text cells. The images have alternative text, say, "yyyy". When I start to drag a row, the alternative text under the cursor looks like an image of "up arrow" instead of "yyyy".

In my case 2: If I would like to use the information from the second column as the alternative text under the cursor to indicate which row I am dragging, what should I do with it?

Of course, if the cells in the first column are holding text instead of image links, everything is fine.

Best regards

Ouyang
Answer posted by Support on Jul 24, 2008 02:07
You can redefine rowToDragElement method to achieve necessary behavior

case 1
grid.rowToDragElement=function(id){
    return this.cells(id,0).getTitle();  
}

case 2
grid.rowToDragElement=function(id){
    return this.cells(id,1).getValue(); 
}