How do i set the decimal points in for a datacolumn?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have following code in C#.NET

m_strTableName = "AFE";
m_dataTable = new DataTable(m_strTableName);
DataColumn dc;
dc = m_dataTable.Columns.Add(COL_DEPTH, typeof(Double)); dc.DefaultValue
= 0.00; dc.Caption = COL_DEPTH + " (ft)";

I want to display datavalue for this colum up to two decimal points
also i want to set the allignment of the Column Header to "Center" and
and for its Text to "Right"

Waiting for quick reply
 
Kunal said:
I have following code in C#.NET

m_strTableName = "AFE";
m_dataTable = new DataTable(m_strTableName);
DataColumn dc;
dc = m_dataTable.Columns.Add(COL_DEPTH, typeof(Double)); dc.DefaultValue
= 0.00; dc.Caption = COL_DEPTH + " (ft)";

I want to display datavalue for this colum up to two decimal points
also i want to set the allignment of the Column Header to "Center" and
and for its Text to "Right"

Waiting for quick reply

Resposting the same question will not give you a different answer.

You still don't do this in the data table. It only holds the data, and
has nothing to do with how you choose to display the data.
 
Göran Andersson said:
Resposting the same question will not give you a different answer.

Maybe he hoped that a new version of .NET had come out since ...

:-)

Arne
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top