Wrox Programmer Forums
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design 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 March 31st, 2005, 01:13 AM
Registered User
Join Date: Mar 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to hidayah
Default template column and bound column

Hi. Im doing a project on asp.net with C#. I have a datagrid table. One of the columns is a template column,'Size'. I want to compare this template column with a bound column, 'Price'.If the price is less than $20, I want to display 'Regular' at the 'Size' column. How do I go about doing this?

Old April 9th, 2005, 03:50 PM
Authorized User
Join Date: Jul 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Mayur52o

there are two ways of doing things.

1. In the CodeBehind in datagrid - ItemDatabound event
    You would reference there and set the Cell Text in code.

2. Would using the asp method.
<# iif(Databinder.Eval(Conatiner.DataItem, "Price") > 20, "Regular", "Size") %#>

Let me know i would be glad to help you out

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bound Template Column in DataGrid dginley ASP.NET 1.0 and 1.1 Professional 2 November 4th, 2006 03:17 PM
Formatting TextBox bound to a database column Raby Visual Basic 2005 Basics 1 September 6th, 2006 07:47 PM
Datagrid template column sonurijs ASP.NET 1.x and 2.0 Application Design 1 September 27th, 2005 12:55 PM
Template Column - question vox ASP.NET 1.0 and 1.1 Basics 2 June 7th, 2005 11:53 AM

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