HighTechTalks DotNet Forums  

grid cell has onclick but hand is not shown

ASP.net Data Grid Control microsoft.public.dotnet.framework.aspnet.datagridcontrol


Discuss grid cell has onclick but hand is not shown in the ASP.net Data Grid Control forum.



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

Default grid cell has onclick but hand is not shown - 05-02-2007 , 09:41 AM






I added an onclick event to a grid cell at bind time
e.Row.Cells[nFieldNum].Attributes.Add("onclick", "return
LaunchInfo('../DetailLocation.aspx')")


This works fine, but there is no indication that one can "click" on the cell
when the cursor is mioved over the item in the cell.

I would like the mouse cursor to change to a hand and back to normal as it
moves over the clickable item. Also, it is even hard to look up information
about this. Where would I go (VS8) to find help about .Attributes.Add(
where visual studio would list the range of arguments available to the Add?
If I highlight Attributes.Add and presss F1 i get Type.Atributes property
help page but what I really want is a list of what the Add arguement can be.


...TIA..


--
================================================== ====================
Joseph "Beemer Biker" Stateson
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== ====================


Reply With Quote
  #2  
Old   
Beemer Biker
 
Posts: n/a

Default Re: grid cell has onclick but hand is not shown - 05-08-2007 , 12:43 PM






I never got a "hand" to appear but I was able to add a mouseover type
tooltip to prompt the user to click for details (from dynamicdrive.com ...
thanks)
e.Row.Cells[nFieldNum].Attributes.Add("onMouseover", "ddrivetip('click to
view detail','yellow',200)");
e.Row.Cells[nFieldNum].Attributes.Add("onMouseout", "hideddrivetip()");

a hand can appear with <a href .. data_to_click_on a> but i dont see how
to set that up in a bound data cell in a grid.

"Beemer Biker" <jstateson (AT) swri (DOT) edu> wrote

Quote:
I added an onclick event to a grid cell at bind time
e.Row.Cells[nFieldNum].Attributes.Add("onclick", "return
LaunchInfo('../DetailLocation.aspx')")


This works fine, but there is no indication that one can "click" on the
cell when the cursor is mioved over the item in the cell.

I would like the mouse cursor to change to a hand and back to normal as it
moves over the clickable item. Also, it is even hard to look up
information about this. Where would I go (VS8) to find help about
.Attributes.Add( where visual studio would list the range of arguments
available to the Add? If I highlight Attributes.Add and presss F1 i get
Type.Atributes property help page but what I really want is a list of what
the Add arguement can be.



Reply With Quote
  #3  
Old   
MasterGaurav \(www.edujini-labs.com\)
 
Posts: n/a

Default Re: grid cell has onclick but hand is not shown - 05-09-2007 , 03:42 AM



Quote:
I added an onclick event to a grid cell at bind time
e.Row.Cells[nFieldNum].Attributes.Add("onclick", "return
LaunchInfo('../DetailLocation.aspx')")


This works fine, but there is no indication that one can "click" on the
cell when the cursor is mioved over the item in the cell.
Do you see the 'onclick' attribute in the rendered table?

You may want to try:
style="cursor: hand"



--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------




Reply With Quote
  #4  
Old   
Beemer Biker
 
Posts: n/a

Default Re: grid cell has onclick but hand is not shown - 05-09-2007 , 09:44 AM



"MasterGaurav (www.edujini-labs.com)" <gaurav.vaish.nospam (AT) nospam (DOT) gmail.com>
wrote in message news:eooz6kikHHA.4248 (AT) TK2MSFTNGP06 (DOT) phx.gbl...
Quote:
I added an onclick event to a grid cell at bind time
e.Row.Cells[nFieldNum].Attributes.Add("onclick", "return
LaunchInfo('../DetailLocation.aspx')")


This works fine, but there is no indication that one can "click" on the
cell when the cursor is mioved over the item in the cell.

Do you see the 'onclick' attribute in the rendered table?

You may want to try:
style="cursor: hand"
Thanks MasterGaurav - I also found (by experimenting) that I could use the
following instead of building my own tooltip
e.Row.Cells[nFieldNum].Attributes.Add("title", "click for details");

Not sure why "title" is used instead of "tooltip"

I am used to having intellisense show me what is available but that does not
work in C# where attributes are being added to a cell programatically. It
is difficult to find what is available for "add"ing using F1 and the built
in help features of VS2005. If I was in jscript then entering a "space"
would have listed available options for the gadget being edited. Is there
good reference to lookup and find stuff like that? For example, in
jscript, if I highlight "window.open' and press F1 there is no help under
Web Development.net but "open" by itself goes to document.open which lists
all the arguements available and they work with window.open. This does not
seem consistent when intellisense shows no arguements for document.open()
but intellisense properly lists all the optional args for window.open()

...thanks..





Reply With Quote
  #5  
Old   
MasterGaurav \(www.edujini-labs.com\)
 
Posts: n/a

Default Re: grid cell has onclick but hand is not shown - 05-31-2007 , 08:03 AM



Quote:
Thanks MasterGaurav - I also found (by experimenting) that I could use the
following instead of building my own tooltip
e.Row.Cells[nFieldNum].Attributes.Add("title", "click for details");

Not sure why "title" is used instead of "tooltip"
Because the attribute 'title' is given in HTML specifications :-)


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------




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 - 2008, Jelsoft Enterprises Ltd.