Ask a Question related to ASP.NET Data Grid Control, Design and Development.
-
johnnydublin@gmail.com #1
Mouseover, mouseout, click etc on datagrid.
Hi there,
Does anyone know of a way that I can specify javascript functions that
are to be run when a cell is clicked, mouse over etc in a datagrid
without attaching the function to every single cell?
I have a diary view with resources across the top and times down the X
axis which means it contains hundreds of cells. I want to add some nice
javascipt that makes the cells change colour as the mouse moves over
them etc. I can get it to work fine by putting a function call behind
each cell (added during the itemdatabound event) but it makes for a
very big download and a lot of processing at data itemdatabound time.
Can I specify that if any TD is clicked I want to run a function?
Any help would be much appreciated,
Thanks
Johnny
johnnydublin@gmail.com Guest
-
image on mouseover close on mouseout
Howdy, I have an imagemap with 4 sections. I want to mouseover and show that image and close it on mouseout. The openbrowser window behavior is... -
DataGrid EditItemCommand : must click twice to make DataGrid Editable
Hey- I am having trouble with a simple datagrid example, and need some advice if anyone is knowledgable. It's really driving me batty! I've... -
datagrid: show movie clip on mouseover row
I'm currently working with a datagrid. Basically, I want to show a movieclip above the cursor when someone mouseovers a row. The movie clip will... -
whole Row in datagrid is sensitive on click
Hi, (C#, ASP.NET) I need to invoke server procedure when user click anywhere on data row in datagrid (datagrid has 6 columns). I need also know... -
Image: MouseOver - MouseOut - OnClick problem
Imagine this: I have a gif-image with text, coloured green. When MouseOver occurs the gif will swap to another gif with red colourded text. On... -
S.M. Altaf [MVP] #2
Re: Mouseover, mouseout, click etc on datagrid.
Hi Johnny,
Handle the ItemDataBound event for the datagrid. In each of the rows of type
Item or AlternateItem, look for the cell you want.
Perform an .Attributes.Add() for the cell, and in this method you can
specify the javascript function you want to call. For example (I'm typing
this off my head, I don't have the IDE open)
e.Item(4).Cells(0).Attributes.Add("onMouseOver","m yColoringFunction();")
HTH
Altaf
--------------------------------------------------------------------------------
All that glitters has a high refractive index.
[url]www.mendhak.com[/url]
<johnnydublin@gmail.com> wrote in message
news:1132915855.600892.50150@f14g2000cwb.googlegro ups.com...> Hi there,
> Does anyone know of a way that I can specify javascript functions that
> are to be run when a cell is clicked, mouse over etc in a datagrid
> without attaching the function to every single cell?
>
> I have a diary view with resources across the top and times down the X
> axis which means it contains hundreds of cells. I want to add some nice
> javascipt that makes the cells change colour as the mouse moves over
> them etc. I can get it to work fine by putting a function call behind
> each cell (added during the itemdatabound event) but it makes for a
> very big download and a lot of processing at data itemdatabound time.
> Can I specify that if any TD is clicked I want to run a function?
> Any help would be much appreciated,
> Thanks
> Johnny
>
S.M. Altaf [MVP] Guest



Reply With Quote

