We take pride in your success. We let our positivity drive us, day in and out. Talk to us at Mindfire to know us more.

Software Technology Tips

Datagrid row highlighted function can be written  in asp.net  as: -

ItemCreated
 
         e.Item.Attributes.Add("onmouseover", "this.style.backgroundColor = 'lightblue';");
         e.Item.Attributes.Add("onmouseout", "this.style.backgroundColor = 'white';");
 
Datagrid renders as a table so this functions is added on every row basis. 
 
 
Using JQuery
 
        query-1.2.5.js ->Download it from http://www.jQuery.com
        jquery.stripy.js -> Download it from http://www.easyjquery.com/examples/jquery-plugin-stripy.zip 

aspx code:- 
      <head runat="server">
      <title>Untitled Page</title>
      <script src="jquery-1.2.5.js"></script>
      <script src="jquery.stripy.js"></script>
  
      <script>
         $(document).ready(function(){
 
          $("#dg").stripy();          
          });
 
      </script>
      </head>
 
   dg  is the  Datagrid ID.


Related Tags:

ASP.NET

Author: Jnana Swain

top

ASP.NET

Let us Connect!

privacy

copyright (c) Mindfire Solutions 2007-2012. Login