HighTechTalks DotNet Forums  

Re: Gridview Control and Customizing Column Displays

ASP.net Building Controls microsoft.public.dotnet.framework.aspnet.buildingcontrols


Discuss Re: Gridview Control and Customizing Column Displays in the ASP.net Building Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Gaurav Vaish \(MasterGaurav\)
 
Posts: n/a

Default Re: Gridview Control and Customizing Column Displays - 01-14-2007 , 05:37 AM






Quote:
I want it to show in Column 1, a customized version of the data...
In that first column, the Picture, with the name underneath it, a link
that
points to a url like: http://www.mysite.com/scripts/?getxml=<itemID> and
a
javascript call that pops up the itemsummary on the page....
Don't autogenerate the columns.
For the Column1, make it 'HyperlinkField' with

1. DataNavigateUrlFormatString set appropriately, including placeholder for
itemID
2. DataNavigateUrlFields set to "itemID"
3. DataTextUrlField set to itemID
4. Optionally, DataTextFormatString set appropriately, like "See Item {0}",
etc.

I have provided an example below. Use it with a data-source that connects to
Northwind and points to 'Customers' table.

<asp:HyperLinkField DataNavigateUrlFields="CustomerID"
DataNavigateUrlFormatString="~/Default.aspx?id={0}"
DataTextField="CustomerID" />

--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujinionline.com
-----------------------------------------




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.