<Style type = "text/CSS">
TD. bgstyle {border-top: #215dc6 1px solid; filter: progid: DXImageTransform. microsoft. gradient (gradienttype = 0, startcolorstr = # c7d4f7, endcolorstr = # ffffff); color: #215dc6; border-bottom: #215dc6 1px solid; Background-color: # e6e6e6}
TD. bgstyleleft {border-top: #215dc6 1px solid; filter: progid: DXImageTransform. microsoft. gradient (gradienttype = 0, startcolorstr = # Strong, endcolorstr = # ffffff); border-left: #215dc6 1px solid; color: #215dc6; border-bottom: #215dc6 1px solid; background-color: # e6e6e6}
TD. bgstyleright {border-Right: #215dc6 1px solid; border-top: #215dc6 1px solid; filter: progid: DXImageTransform. microsoft. gradient (gradienttype = 0, startcolorstr = # c7d4f7, endcolorstr = # ffffff); color: #215dc6; border-bottom: #215dc6 1px solid; Background-color: # e6e6e6}
</Style>
<Script language = "JavaScript">
<! --
Function changein (object)
{
Object. cells [0]. classname = "bgstyleleft ";
Count = object. cells. length;
For (I = 1; I <= count-1; I ++)
{
Object. cells [I]. classname = "bgstyle ";
}
Object. cells [count-1]. classname = "bgstyleright ";
// Document. All ("tblhisname"). innertext = "aaaa ";
// Document. All. tblhisname. value = object. cells [0]. value;
}
// -->
</SCRIPT>
<Script language = "JavaScript">
<! --
Function changeout (object)
{
Object. cells [0]. classname = "";
Count = object. cells. length;
For (I = 1; I <= count-1; I ++)
{
Object. cells [I]. classname = "";
}
Object. cells [count-1]. classname = "";
}
// -->
</SCRIPT>
Private void maid (Object sender, system. Web. UI. webcontrols. datagriditemeventargs E)
{
If (E. Item. itemtype = listitemtype. Item | E. Item. itemtype = listitemtype. alternatingitem)
{
String orderitemid = E. Item. cells [0]. Text; // E. Item. cells [0]. text;
Tblhisname. Text = orderitemid;
// Add Custom Attributes. When the mouse moves over, set the background color of the row to "6699ff" and save the original background color.
E. Item. Attributes. Add ("onmouseover", "currentcolor = This. style. backgroundcolor; this. style. backgroundcolor = '# 6699ff '");
// Add custom attributes to restore the background color of the row when the mouse moves
E. Item. Attributes. Add ("onmouseout", "This. style. backgroundcolor = currentcolor ");
// Mouseover highlighting
E. Item. Attributes. Add ("onmouseover", "changein (this )");
E. Item. Attributes. Add ("onmouseout", "changeout (this )");
E. Item. Attributes. Add ("onclick", "window. Open ('default. aspx? Id = "+ E. Item. cells [0]. Text + "');");
}
If (E. Item. itemindex! =-1)
{
E. Item. Attributes. Add ("onmouseover", "This. bgcolor = '# c1d2ee '");
E. item. attributes. add ("onclick", "document. all. text1.innertext = This. cells [0]. innertext; document. all. form1.city. value = This. cells [0]. innertext ;");
If (E. Item. itemindex % 2 = 0)
{
E. Item. Attributes. Add ("bgcolor", "# ffffff ");
E. Item. Attributes. Add ("onmouseout", "This. bgcolor = Document. getelementbyid ('ngin1'). getattribute ('singlevalue ')");
}
Else {
E. Item. Attributes. Add ("bgcolor", "oldlace ");
E. Item. Attributes. Add ("onmouseout", "This. bgcolor = Document. getelementbyid ('hand1'). getattribute ('oldvalue ')");
}
} Else
{
Datagrid1.attributes. Add ("oldvalue", "oldlace ");
Datagrid1.attributes. Add ("singlevalue", "# ffffff ");
}
}
# Region web form designer generated codeoverride protected void oninit (eventargs E)
{/// Codegen: This call is required by the ASP. NET web form designer. // Initializecomponent (); base. oninit (E );}