Solved

Puting Extra Items Into Gridview Along With Databinding

Posted on 2011-03-25
3
193 Views
Last Modified: 2012-05-11
This is actually two questions.  

First, I am trying to convert an result from a query into a hyperlink that will lead to an image path on our servers.  So, I get the path from the query, then how can I convert it to a hyperlink for Gridview to display?

Second say you have query results that you want to put into a Gridview from a datatable like this:

        Dim dtFinalResults As DataTable = Session("Result_Data")
        GridView1.DataSource = dtFinalResults
        GridView1.DataBind()

Open in new window


But lets say in addition to that you want to add something else to each row.  Say a preview image or a button how would you do that?
0
Comment
Question by:DPottsLM
[X]
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
3 Comments
 
LVL 7

Accepted Solution

by:
nbove earned 250 total points
ID: 35219407
1)  Look into using a hyperlink field.  The following page describes how to use a hyperlink field in a gridview:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.hyperlinkfield.aspx

2)  You are probably going to have to modify each row on the RowDataBound event.  The following page describes how to use the RowDataBound event in a gridview:
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.gridview.rowdatabound.aspx
0
 
LVL 19

Expert Comment

by:Amandeep Singh Bhullar
ID: 37230468
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

695 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