Cool ! Just make sure to handle Null values.

On Mar 18, 6:02 pm, Kyle Blankenship <[email protected]>
wrote:
> Thanks, I used the following foreach loop to correct the value:
>
> foreach (DataRow dr in dsprocoverpay.Tables[0].Rows)
>             {
>                dr[0] = dr[0].ToString().Replace("-", "");
>             }
>
> Thanks for the suggestion.
>
> On Mar 18, 1:23 am, Cerebrus <[email protected]> wrote:
>
>
>
> > I get it. Then you correctly assume that you would need to iterate
> > through the Datatable and modify the relevant column's values.
>
> > Something like:
>
> > ---
> > foreach (DataRow dr in dsprocoverpay.Tables[0].Rows)
> > {
> >   string oldValue = dr["MyColumnName"];  // "###-######"
> >   string newValue = oldValue.Replace("-", "");
> >   dr["MyColumnName"] = newValue;         // "#########"}
>
> > ---
>
> > On Mar 17, 7:52 pm, Kyle Blankenship <[email protected]>
> > wrote:
>
> > > Currently, binding to the datagrid is for testing purposes only so
> > > that I can see the values in the dataset.  The issue is that the data
> > > is being uploaded via a vendor, who have added the "-" into the
> > > string.  I need to strip out that "-" so that it conforms with our
> > > systems.  The vendor is unable to remove the "-" prior to uploading
> > > the .csv.- Hide quoted text -
>
> - Show quoted text -

To unsubscribe from this group, send email to 
dotnetdevelopment+unsubscribegooglegroups.com or reply to this email with the 
words "REMOVE ME" as the subject.

Reply via email to