.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Need to open popup window from the GridView

Posted By: Savi3     Posted Date: December 09, 2008    Points:2   Category :ASP.Net
hi to all, I need to open the Pop up window while clicking the edit column in the Grid view. Plz tell me. Its very Urgent

Responses
Author: Praveen             
Posted Date: December 09, 2008     Points: 5   

dont use edit column in your scenerio, i suggest you to take one template column and use anchor tag, you can also pass the id as querystring like this

<a href="editPage.aspx?id=yourID" target=_blank> Edit </a>

Author: Athira Sreejith             
Posted Date: February 24, 2009     Points: 5   

Hi..

protected void GvFirmDetail_RowDataBound(object sender, GridViewRowEventArgs e)
{
string ContactRowId = ((Label)e.Row.Cells[0].FindControl("lblId")).Text;
ImageButton btnContact = new ImageButton();
btnContact = (ImageButton)e.Row.Cells[7].FindControl("btnAddContact");
btnContact.Attributes.Add("OnClick", "new_window('Prospectscontact.aspx?PFid=" + ContactRowId + "','sample','scrollbars=yes','width=300,height=380')");

}

Author: Athira Sreejith             
Posted Date: March 31, 2009     Points: 5   

Hi..


<asp:ImageButton ID="btnEdit" runat="server" ImageUrl="~/Images/ico-edit.gif" CommandName="Editcontact"
CommandArgument='<%# Bind("Id") %>' AlternateText="Edit Contact"></asp:ImageButton>

.csPage:
protected void GvFirmDetail_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
string ContactRowId = ((Label)e.Row.Cells[0].FindControl("lblId")).Text;
ImageButton btnContact = new ImageButton();
btnContact = (ImageButton)e.Row.Cells[7].FindControl("btnAddContact");
btnContact.Attributes.Add("OnClick", "new_window('Prospectscontact.aspx?PFid=" + ContactRowId + "','sample','scrollbars=yes','width=300,height=380')");


<script type="text/JavaScript">
<!--
function new_window(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
//-->
</script>
}
}

Author: Santosh             
Posted Date: October 09, 2009     Points: 5   

Try below code ,below code I giving to applicable in windows applicatio
Dim Index As Integer = e.RowIndex
Dim frm As New frmVendorPopup("MillOrder")
frm.ShowDialog()
Me.dgvDisplay.Rows(Index).Cells("Column1").Value = DBNull.Value
Me.dgvDisplay.Rows(Index).Cells("Column2").Value = DBNull.Value
Me.dgvDisplay.Rows(Index).Cells("Column3").Value = DBNull.Value
Me.dgvDisplay.Rows(Index).Cells("Column4").Value = DBNull.Value
Me.dgvDisplay.Rows(Index).Cells("Column5").Value = DBNull.Value
Me.dgvDisplay.Rows(Index).Cells("ID").Value = frm.dgCustomer.CurrentRow.Cells("ID").Value
Me.dgvDisplay.Rows(Index).Cells("Name").Value = frm.dgCustomer.CurrentRow.Cells("Name").Value
txtAddress.text = frm.dgCustomer.CurrentRow.Cells("Address").Value

Ragards
Santosh



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend