Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Datagrid onclick change cell backcolor

Reply
Thread Tools

Datagrid onclick change cell backcolor

 
 
Franck
Guest
Posts: n/a
 
      06-07-2005
Hi,
is it possible to change datagrid cell backcolor when user click on it
?

Thks for help.

 
Reply With Quote
 
 
 
 
Eliyahu Goldin
Guest
Posts: n/a
 
      06-07-2005
Sure,

In either ItemDataBound or PreRender event get to the cell and set
Attributes["onclick"]="onCellClick(this)";

In javascript function onCellClick set visual parameters or apply a css
style to the cell referenced by the input parameter.

Eliyahu

"Franck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Hi,
> is it possible to change datagrid cell backcolor when user click on it
> ?
>
> Thks for help.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting BackColor of GridView cell dynamically Mike P ASP .Net 1 08-30-2006 03:07 PM
change backcolor of cell in runtime rjl ASP .Net 5 11-23-2005 01:52 PM
how to change backcolor on cell at runtime for c# ? feel ASP .Net Datagrid Control 1 07-27-2005 10:31 AM
Setting cell backcolor Todd Q ASP .Net Datagrid Control 3 08-19-2004 01:07 PM
How do I change the BackColor of a Repeater? jm ASP .Net 3 05-14-2004 02:59 AM



Advertisments