Wrox Programmer Forums
|
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 22nd, 2007, 06:17 AM
Registered User
 
Join Date: Jun 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Change a value in Gridview

Hi,

(Using SQL Server, Visual Web Developer Express, VB, .NET 2.0)

I have a form that sends 3 parameters to a Stored Procedure and returns it to a DataGrid, the Grid is bound to the Stored Procedure.

One of the values returned can be -9999, when the Grid is rendered I want any occurence of -9999 to come up as blank.

My VB is not great! The Grid is "GridView1".

Thanks!


 
Old June 26th, 2007, 01:34 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I think you just need an if statement in your code behind for the data grid.

If @parameter = -9999 Then
       @parameter = ""
End If

Something like that I think.

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Get GridView Cell Value Based on GridView Column stublair C# 2008 aka C# 3.0 0 September 4th, 2008 08:30 AM
how to change value of radiobuttonlist in gridview hertendreef ASP.NET 2.0 Professional 0 May 30th, 2008 04:29 AM
Urgent:Gridview Change Colour ashvinm ASP.NET 2.0 Basics 1 March 4th, 2008 09:19 AM
Change value in GridView Cell Sheraz Khan ASP.NET 2.0 Professional 2 August 30th, 2007 11:12 AM
How to change the value of one cell in a GridView? [email protected] ASP.NET 2.0 Basics 8 November 19th, 2006 01:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.