중gridview 문자열 캡처 방법

2025 단어
먼저 프론트에 스타일을 잡아주세요.
 
  
 

백그라운드 GridView의 RowDataBind에서 설정
, 마우스 움직임을 변경할 수 있는 스타일 설정을 몇 마디 덧붙인다
 
 
  
 //  
   protected void gv_showReport_RowDataBound(object sender, GridViewRowEventArgs e) 
   { 

       if (e.Row.RowType == DataControlRowType.DataRow) 
       { 

           //  
           e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=c"); 
           e.Row.Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#F4FBFF'"); 
           e.Row.Attributes.Add("onclick", "this.style.backgroundColor='#e2eaf1'"); 
       } 
       if (e.Row.RowType == DataControlRowType.Header) 
       { 
           e.Row.Attributes.Add("style", "background-image:url('../images/grid3-hrow.gif')"); 
       } 
       if (e.Row.RowType == DataControlRowType.DataRow) 
       { 
           //  
           string strDISC = e.Row.Cells[4].Text.Trim(); 
           e.Row.Cells[4].Text = "
" + strDISC + "
"; 
           e.Row.Cells[4].ToolTip = strDISC;//  

           //  
           string str = e.Row.Cells[7].Text.Trim(); 
           e.Row.Cells[7].Text = "
" + str + "
"; 
           e.Row.Cells[7].ToolTip = str; 

       } 
   } 
 

좋은 웹페이지 즐겨찾기