Wednesday, August 11, 2010

Problem in dataformatstring of numbers in a template column of a datagrid in ASP.Net?

I use a template column to display a column of numbers in a datagrid. I have formatted the data using the format string ';0:#,#';. This is for using comma as thousand separator for numbers. The problem is when the value is equal to zero, it is not displayed but it is left blank. How to display zero values also while using formatting?Problem in dataformatstring of numbers in a template column of a datagrid in ASP.Net?
Use the format string ';0:N0';. This is the proper format string for a number with commas separating thousands. The 0 after the N indicates zero decimal places. Please see the source link for other options on formatting numbers.Problem in dataformatstring of numbers in a template column of a datagrid in ASP.Net?
is the datagrid directly connected with the database.? or u r using some middle(business) layer to fetch the data and pass it on to the presentation layer..?

No comments:

Post a Comment