The datagrid is only there for testing purposes to allow me to view
the dataset values.  The vendor who is uploading the file has added
the "-", which they are unable to remove prior to uploading the .csv.
I need to remove the "-" in order to process the file into our system.

On Mar 17, 5:18 am, Cerebrus <[email protected]> wrote:
> Why would you format a dataset value ? Formats are usually (when sense
> prevails) applied to values rendered from a datasource. In your case,
> it appears you are binding a Dataset to a DataGrid/GridView.
> Therefore, you should be applying the format to the BoundColumn or
> BoundField that needs formatting, rather than asking about how to
> format a Dataset value.
>
> On Mar 17, 2:07 am, Kyle Blankenship <[email protected]>
> wrote:
>
> > 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!

Reply via email to