Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

open a popup window from a linkbutton or hyperlink inside a datagrid in vb

Posted on 2006-11-29
5
709 Views
Last Modified: 2012-05-05
i have a datagrid and i want to add a linkbutton or hyperlink to it so i can open up a popup window.

i am using vs.2003


thanks
jcook32
0
Comment
Question by:jcook32
5 Comments
 
LVL 13

Expert Comment

by:jeebukarthikeyan
ID: 18036947
hi,

create a template coloum in the datagrid

in the item databound event create a hyperlink text to it

on the click call a javascript

if u want i will put some code

b u d d h a
0
 
LVL 28

Accepted Solution

by:
strickdd earned 450 total points
ID: 18039769
Something like this should work:

<asp:TemplateField>
<HeaderTemplate>
    Column Header Here
</HeaderTemplate>
<ItemStyle HorizontalAlign="Left" VerticalAlign="Bottom" />
<ItemTemplate>
    <asp:Button ID="btn" runat="server" CommandArgument="<%# Bind('IDField')%>" Text="Click" CausesValidation="False" />
    </ItemTemplate>
</asp:TemplateField>

protected void grdUsers_OnRowDataBound(object sender, GridViewRowEventArgs e)
    {

        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            Button btn= (Button)e.Row.FindControl("btn");
            btn.Attributes.Add("onclick", "window.open([sURL] [, sName] [, sFeatures] [, bReplace]);");
        }
    }
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question