Wrox Programmer Forums
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 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 Professional 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 August 14th, 2008, 04:48 PM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 599
Thanks: 6
Thanked 3 Times in 3 Posts
Default Footer Format Problem

Hi,

I'm having a problem formatting datagrid footer values to a number. When I debug I can see that the value of grdTotals.Items.Item(i).Cells(n).Text is "1,903" which is the formatting that I'm trying to achieve but when I get past e.Item.Cells(n).Text = String.Format(x(n), "##,###") the value is 1903.

Thank you for any suggestions.

Richard

Dim x(n) As Integer
  For i = 0 To grdTotals.Items.Count - 1
      For n = 1 To grdTotals.Items.Item(i).Cells.Count - 1
          x(n) += grdTotals.Items.Item(i).Cells(n).Text
          e.Item.Cells(n).Text = String.Format(x(n), "##,###")
          If Len(e.Item.Cells(n).Text) = 0 Then
              e.Item.Cells(n).Text = "0"
          End If
      Next
  Next






Similar Threads
Thread Thread Starter Forum Replies Last Post
Headr and footer problem redro XSLT 1 April 20th, 2008 03:40 PM
Footer problem monika.vasvani ASP.NET 1.0 and 1.1 Professional 0 October 4th, 2006 02:03 AM
Date Format Problem Scripts82 Access VBA 2 March 13th, 2006 09:36 PM
Problem with format slgknjn Beginning VB 6 2 May 25th, 2005 08:16 AM





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