Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a asp.net website to be used on touch screen where when a user clicks on a row of a grid view, pop up page must appear to ask for user authentication and the page of grid must be disable...
I am looking for a code to enable this .. can anyone help me??

aspx page
ASP.NET
<table>
  <tr>
    <td> 
      <asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable" EmptyDataText="No Record Found" Width="100%" AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound">
      <asp:BoundField DataField="Code" HeaderText="Code" />
      <asp:BoundField DataField="Workplace" HeaderText="Workplace" />    
      <asp:BoundField DataField="Description" HeaderText="Description" />                            
    </td>
  </tr>
</table>


aspx.cs page
C#
protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
  if (e.Row.RowType == DataControlRowType.DataRow)
  {
    e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'");
    e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'");
  }  
}
Posted
Updated 5-Jan-14 20:05pm
v2
Comments
Kornfeld Eliyahu Peter 6-Jan-14 1:51am    
Have you done anything so far?
Let us see it...
Codes DeCodes 6-Jan-14 1:59am    
In aspx page <table> <tr> <td> <asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable" EmptyDataText="No Record Found" Width="100%" AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound"> <asp:BoundField DataField="Code" HeaderText="Code" /> <asp:BoundField DataField="Workplace" HeaderText="Workplace" /> <asp:BoundField DataField="Description" HeaderText="Description" /> </td> </tr> </table> on aspx.cs page protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'"); e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'"); } }
Nandakishore G N 6-Jan-14 1:53am    
Paste the code and design part. what have you done till now?
Codes DeCodes 6-Jan-14 1:59am    
In aspx page
<table>
<tr>
<td>
<asp:GridView ID="GridViewResourceGroup" runat="server" CssClass="gridTable"
EmptyDataText="No Record Found" Width="100%"
AutoGenerateColumns="false" onrowdatabound="GridViewResourceGroup_RowDataBound">
<columns>
<asp:BoundField DataField="Code" HeaderText="Code" />
<asp:BoundField DataField="Workplace" HeaderText="Workplace" />
<asp:BoundField DataField="Description" HeaderText="Description" />


</td>
</tr>
</table>

on aspx.cs page

protected void GridViewResourceGroup_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onmouseover", "this.style.backgroundColor='#6699FF'");
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor='#F9F7F7'");
}
}

looking forward for assistance ... thank you
Karthik_Mahalingam 6-Jan-14 2:48am    
you mean modal popup ?

You may refer this link.

http://www.aspsnippets.com/Articles/Add-Edit-Update-Records-in-GridView-using-Modal-Popup-in-ASP.Net.aspx[^]

This example matches with your requirement.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900