Highlight gridview row in update panel without posting back

后端 未结 3 1296
别那么骄傲
别那么骄傲 2021-01-21 05:39

I have a gridview in an update panel with the following code to select a row, this in turn updates another updatepanel with details from the form record.

prote         


        
3条回答
  •  孤街浪徒
    2021-01-21 06:12

    Firstly, you can't apply text-decoration to a ... or a for that matter. You need to apply it to the elements inside.

    Here are a couple adjustments you can try-

    e.Row.Attributes.Add("onmouseover", "this.style.cursor='hand';";
    
    
    
    e.Row.Attributes.Add("onclick", ClientScript.GetPostBackClientHyperlink(this.gvMainGrid.ClientId, "Select$" + e.Row.RowIndex)); 
    

    The 1st works for me in code. Didn't have anything handy to test the 2nd.

提交回复
热议问题