am having trouble formating my numbers to currency..am drawing a bar chart and i want to have the numbers in the form of currency.what am getting is just integers for example instead of getting 200.00 am getting just 200.below is my code`
string connect=TraceBizCommon.Configuration.ConfigSettings.ConnectionString;
SqlConnection conn = new SqlConnection(connect);conn.Open();
SqlCommand cmd = new SqlCommand("select substring(Customer, 1,8),[Total Amount] from CustomerDebts ", conn);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
string[] x = new string[dt.Rows.Count];
decimal[] y = new decimal[dt.Rows.Count];
for (int i = 0; i
{
x[i] = dt.Rows[i][0].ToString();
y[i] = Convert.ToInt32(dt.Rows[i][1]);
}
BarChart1.Series.Add(new AjaxControlToolkit.BarChartSeries { Data = y});
BarChart1.CategoriesAxis = string.Join(",", x);
BarChart1.ChartWidth =500.ToString();//(x.Length * 100).ToString();
BarChart1.ChartHeight = 600.ToString();//(y.Length * 75).ToString()`
Amit GuptaPosted Dec 17, 2017, 5:33 PM
john kanyoraPosted Dec 18, 2017, 2:31 AM
Amit GuptaPosted Dec 18, 2017, 2:19 AM
john kanyoraPosted Dec 18, 2017, 2:14 AM
Posted Dec 17, 2017, 11:30 AM
john kanyoraPosted Dec 17, 2017, 10:01 AM
Amit GuptaPosted Dec 16, 2017, 3:52 AM
Rafnas T PPosted Dec 16, 2017, 12:09 AM
john kanyoraPosted Dec 15, 2017, 3:55 AM
Laxmidhar SahooPosted Dec 15, 2017, 3:47 AM
john kanyoraPosted Dec 15, 2017, 3:44 AM
Altaf AnsariPosted Dec 15, 2017, 3:39 AM