Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6649439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:46:27+00:00 2026-05-26T00:46:27+00:00

Tech: .NET, SQL Server 2008 R2, Winforms Ok, for the life of me, I

  • 0

Tech: .NET, SQL Server 2008 R2, Winforms

Ok, for the life of me, I cannot figure this out.

First and foremost, I’m using a DataTable to store the data, which is coming from an SQL server 2008 database, and I’m binding it to a DataRepeater.

I’ve tried changing the binding like this:

label1.DataBindings.Add("Text", history, "Value", true, DataSourceUpdateMode.Never, "", "N");

which works great on textboxes and labels elsewhere, but not on the DataRepeater. (label1 is part of the ItemTemplate associated with the DataRepeater)

Since binding the data like that isn’t working, I want to just take my DataTable and just force the column to have the format listed above.

And manually changing the format of the data: (it’s a Float)

for (int i=0;i < history.Rows.Count;i++)
{
    history.Rows[i]["Value"] = String.Format("{0:N}", history.Rows[i]["Value"]);
}

Doesn’t work either, the datarepeater just changes it back.

I want this:

12,123,123.00

and I get this:

12123123

Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:46:28+00:00Added an answer on May 26, 2026 at 12:46 am

    I think it is your DataTable “history” that converts the values back to double. When the column’s data type is double (which I suspect) then it accepts a string representation of a double and kindly converts it back.

    You should add a computed column to your DataTable and fill it with the string representation of the numeric value.

    BTW: you forgot a i++ in your for statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Asp.net is my first incursion into web development using server side tech. The last
I am using VS 2008, SQL Server 2008, IIS 6.0 Manager on an XP
We have developed a .NET web application that uses SQL Server as a backend.
Has anyone tried installing SQL Server 2008 Developer on a machine that already has
I am successfully querying data in a Sql Server CE database using the TableDirect
I have a SQL Server 2005 named instance using Windows Authentication with domain groups
How do SQL Server View Indexes work under the hood? I've read this TechNet
I read some articles about Comet tech. All of them mentioned that the long-life
I'm trying to nut out a highlevel tech spec for a game I'm tinkering
Is Powershell a mature enough tech for enterprise to be using? Are its many

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.