clickable gridview
-
hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance
-
hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance
May be this Help you can do this in rowdatabound event of grid e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffffff';"); here u have to find row and column what u selected from grid by javascript, then pass these ids in check page. e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#000000';"); e.Row.Cells[3].Attributes.Add("onmouseover", "javascript:window.open('check.aspx?id="+ val1+"','large','width=300,height=300,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=0')");
-
May be this Help you can do this in rowdatabound event of grid e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#ffffff';"); here u have to find row and column what u selected from grid by javascript, then pass these ids in check page. e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#000000';"); e.Row.Cells[3].Attributes.Add("onmouseover", "javascript:window.open('check.aspx?id="+ val1+"','large','width=300,height=300,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=0')");
-
Here I write the code in RowDataBound: e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';this.style.background='#FFF5E6'"; e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';this.style.background='none'"; e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this, "Select$" + e.Row.RowIndex); and to redirect to another page I write in SelectedIndexChanged: GridViewRow selectedRow = GridView1.SelectedRow; Label idLabel = (Label)selectedRow.FindControl("Label1"); Response.Redirect("aff.aspx?StructureId=" + idLabel .Text); but the last redirect code not working
-
hello everyone I would like to know how to do a double click on a gridview in asp.net / c # to open a page that displays the details of the column selected, I do a lot of research but I don't understand, please i need your support and thank you in advance
I would like to request you to please go through this article. This will help you. Developing a row-clickable GridView[^] Thanks :)
Cheers ! Abhijit Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
I would like to request you to please go through this article. This will help you. Developing a row-clickable GridView[^] Thanks :)
Cheers ! Abhijit Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.