Passing Data From a Datagrid back to Client Script

symondamy

New Member
Hi, I am adding an Odblclick event to individual cells on my datagrid. I need to be able to pass the text value of each cell to client side script so an active x object can use it. I figured out that i can get the test by doing this: searchResult.Items(n).Cells(n).Text. Everytime i double click on the cells, the text is empty. But if I wanted to print out say "apple" it can just put 'apple' and that will print. I have tried everything to get the cell text to print out, by using Trim, putting '' around it, please help. <BR><BR>Server side code: <BR>'Note I am just putting an ondblclick event on the whole row for now using the first row and first column for each for testing <BR>Sub SetGridProperties() <BR>Dim i, music <BR><BR>For i = 0 to Pubs.Items.Count-1 <BR>'Tried this <BR>'music = replace(Pubs.Items(1).Cells(1).Text, " ", "&#124") <BR>'Tried this <BR>'music = Pubs.Items(1).Cells(1).Text <BR>Pubs.Items(i).Attributes.Add("OnDBLClick","PlayMe(Trim(Pubs.Items(0).Cells(0).Text))") <BR>Next <BR>End Sub <BR><BR>Client side Script <BR>Sub PlayMe(music) <BR>msgbox music <BR>End Sub
 
Back
Top