HighTechTalks DotNet Forums  

Adding attribute to datagrid cell

Dotnet Data Tools microsoft.public.dotnet.datatools


Discuss Adding attribute to datagrid cell in the Dotnet Data Tools forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default Adding attribute to datagrid cell - 07-29-2005 , 01:40 PM






I am using the follwing code to add an attribute to a datagrid cell:

e.Item.Cells(0).Attributes.Add("onmouseover", _
"ShowToolTip('" & theName & _
"','" & theAddress & "','" & _
theCityStateZip & "','" & _
theProfile & "');")
e.Item.Cells(0).Attributes.Add("onmouseout", "HideToolTip();")

This code works the majority of the time but when the datagrid is rendered
the call to the javascript is split on two seperate lines if there is a long
address.
This causes a javascript unterminated string error, here is what was
generated on the client side:

<td nowrap="nowrap" onmouseover="ShowToolTip('Harold M Young','109 Layle
Ln - PO Box 1382
','Watkinsville, GA 30677','');" onmouseout="HideToolTip();">07/22/05
13:08:52</td><td nowrap="nowrap">WATKINSVL GA</td><td nowrap="nowrap">Web
Site 800#</td><td nowrap="nowrap">Answered</td><td nowrap="nowrap"> </td><td
nowrap="nowrap"> </td><td nowrap="nowrap" align="Center"><A
href=http://www.buehner-fry.info/NarrowcastChart/Recordings/13431/7067693208072205100844.wav><img
src=http://www.buehner-fry.info/NarrowcastChart/images/Speaker.gif width=16
height=16 border=0></A></td><td nowrap="nowrap">6</td><td
nowrap="nowrap"> </td><td nowrap="nowrap">(706) 769-3208</td>

Anyone have any ideas?
--
Mike Hollibaugh

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.