All,
I am trying to format a dataset value(s) in c#. The value is
currently in ###-###### format. I need to format the value for each
datacell to be ######### (i.e., without the "-"). I am assuming I
need foreach to loop through each row and modify the value, but I
can't find any way to do this.
Here's my code:
protected void btnprocover_Click(object sender, EventArgs e)
{
OleDbCommand procoverpay = new OleDbCommand();
procoverpay.Connection = con;
procoverpay.CommandType = CommandType.StoredProcedure;
DataSet dsprocoverpay = new DataSet();
OleDbDataAdapter daprocoverpay = new
OleDbDataAdapter("procoverpay", con);
daprocoverpay.SelectCommand.CommandType =
CommandType.StoredProcedure;
con.Open();
daprocoverpay.Fill(dsprocoverpay);
con.Close();
foreach (DataRow dr in dsprocoverpay.Tables[0].Rows)
{
}
dgprocoverpay.DataSource = dsprocoverpay;
dgprocoverpay.DataBind();
dgprocoverpay.Visible = true;
}
Any help would be greatly appreciated!