1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Datagrid Problem

Discussion in 'C#' started by technoguy, Jan 21, 2007.

Thread Status:
Not open for further replies.
  1. #1
    I have a problem with datagrid in Asp.Net. What I want is when I click grid on a particular row. That record should be displayed in popup window.

    Is it possible?
     
    technoguy, Jan 21, 2007 IP
  2. BurgerKing

    BurgerKing Active Member

    Messages:
    397
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Short answer - Yes.

    There are heaps of ways of doing it, but here is one.

    Add an anchor field with the HTML

    <a target='_blank' href='http://yoursite.com/singlerecord.asp?key=XXX'>View Row</a>

    Where XXX is the unique key that defines a record.

    http://yoursite.com/singlerecord.asp is a page on your site which displays the data for a single record.

    When the user clicks on this link, it opens a new popup, and immediately displays the data for the unique key specified.


    Another method is to use javascript to write the contents of the selected row into the new window. This method is a better user experience (no postback) but may not work as well if you want to let the user edit & save the data once it is in the popup window.

    Cheers.
     
    BurgerKing, Jan 28, 2007 IP
Thread Status:
Not open for further replies.