Solved

Puting Extra Items Into Gridview Along With Databinding

Posted on 2011-03-25
3
192 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

Independent Software Vendors: 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

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

738 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