473,473 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Format in aspx datagrid

Jac
Hi,

In my datagrid I have following line :
<asp:BoundColumn DataField="VervalDt" HeaderText="Vervaldatum"
DataFormatString="{0:d}"></asp:BoundColumn>

But I want an empty column when my datafield (VervalDt) = 01/01/0001 (=
DateTime.MinValue)

So, if my date = 01/01/0001 I want to put an empty string in that column,
otherwise the date.

Somebody know how to fix that?

Thanks,
Jac
Nov 16 '05 #1
1 2432
Hi Jac:

You could replace the min time with a null value in those rows where
mintime appears. Another option is to override the ItemDataBound
event of the grid, look for the min time in the controls, and replace
the cell contents with a space.

HTH,

--
Scott
http://www.OdeToCode.com/

On Fri, 1 Oct 2004 01:25:04 -0700, Jac <Ja*@discussions.microsoft.com>
wrote:
Hi,

In my datagrid I have following line :
<asp:BoundColumn DataField="VervalDt" HeaderText="Vervaldatum"
DataFormatString="{0:d}"></asp:BoundColumn>

But I want an empty column when my datafield (VervalDt) = 01/01/0001 (=
DateTime.MinValue)

So, if my date = 01/01/0001 I want to put an empty string in that column,
otherwise the date.

Somebody know how to fix that?

Thanks,
Jac


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: phmyhn | last post by:
I have two web pages, one is viewlarger.aspx, another one is shoppingcart.aspx. On the viewlarger.aspx, when clicking "add to cart" image button, the sub appends the id (passed from another page...
2
by: D. Shane Fowlkes | last post by:
I have a couple of fields in SQL Server which are defined as "Money". One is "Quantity" and the other is "Unit Price". Unit Price I can understand being defined as "money" but I'm not sure why the...
6
by: Hutty | last post by:
I've looked around and have yet to find anything that would answer my question regarding formating a column in a datagrid. My grid looks like this as far as data" AMHQCON|51300.01|-3147 The...
4
by: yer darn tootin | last post by:
Does anyone know the sort expression for a column that's data has been returned in the format, eg '07 Jul 05'?? The sort expression {..:"dd mmm yy"} doesn't work ( if the column was returned as...
1
by: differentsri | last post by:
THIS IS AN ASP.NET 1.1 APPLICATION IAM TRYING TO UPDATE THE FIELD BUT I AM NOT ABLE TO UPDATE IT? CAN U TELL THE REASON ? IT IS GIVING THE FOLLOWING ERROR BELOW I HAVE ALSO GIVEN THE CODE OF...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.