Welcome to Gridview Hell

Discussion in 'ASP .Net Datagrid Control' started by C. David Johnson, Apr 27, 2006.

  1. Ok I am working on the simplest thing ever that is turning in to the
    biggest train wreck ever.

    I have a database with a series of photo albums and the image path &
    name for each image. I pass the info to the gridview via the Query
    string. The thumbnails load with no problems as long as I use the
    ASP:Images control

    I tried to use the imagebutton but I could not dynamically set the
    image property

    My problem comes when I want to run a process when the user clicks on
    the image in the gridview.

    When the image is clicked I need to make a trip to the DB to get the
    detail for the image and load the non thumbnail image., Caption and
    story behind the imageā€¦


    In 2003 I was able to reference invisible items in the grid. Did they
    change that in 2005 or am I smoking crack and not sharing again.

    For every image I have an ID, ImageName , Caption and Story. Now I
    just need to be able to make a call by what ever means necessary to
    pull the data back and populate the detail portion of the page,

    Any Ideas?
     
    C. David Johnson, Apr 27, 2006
    #1
    1. Advertising

  2. C. David Johnson

    Teemu Keiski Guest

    Hi,

    invisible item's data isn't kept in ViewState in 2005 as it was in previous
    versions, yes. If you want a field/fields to be non-visible and use it, set
    it/them into DataKeyNames ( DataKeyNames="field1,field2,fieldN" and so on )
    when they become available via data keys (or bind the data into hidden
    Labels and access them, being hidden concerns only field objects )

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "C. David Johnson" <> wrote in message
    news:eek:...
    > Ok I am working on the simplest thing ever that is turning in to the
    > biggest train wreck ever.
    >
    > I have a database with a series of photo albums and the image path &
    > name for each image. I pass the info to the gridview via the Query
    > string. The thumbnails load with no problems as long as I use the
    > ASP:Images control
    >
    > I tried to use the imagebutton but I could not dynamically set the
    > image property
    >
    > My problem comes when I want to run a process when the user clicks on
    > the image in the gridview.
    >
    > When the image is clicked I need to make a trip to the DB to get the
    > detail for the image and load the non thumbnail image., Caption and
    > story behind the image.
    >
    >
    > In 2003 I was able to reference invisible items in the grid. Did they
    > change that in 2005 or am I smoking crack and not sharing again.
    >
    > For every image I have an ID, ImageName , Caption and Story. Now I
    > just need to be able to make a call by what ever means necessary to
    > pull the data back and populate the detail portion of the page,
    >
    > Any Ideas?
     
    Teemu Keiski, Apr 30, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Allan Wong

    DLL Hell in .NET

    Allan Wong, Sep 25, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    2,781
    Mark Kamoski
    Sep 25, 2003
  2. C. David Johnson

    Welcome to Gridview ImageButton Hell

    C. David Johnson, Apr 27, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    609
    C. David Johnson
    Apr 27, 2006
  3. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    18,042
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  4. Brian van den Broek

    mailing list welcome welcome msg in wiki suggestion

    Brian van den Broek, Dec 12, 2004, in forum: Python
    Replies:
    0
    Views:
    730
    Brian van den Broek
    Dec 12, 2004
  5. C. David Johnson

    Welcome to Gridview Hell

    C. David Johnson, Apr 27, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    128
    clickon
    Apr 28, 2006
Loading...

Share This Page