Re: 2nd Post - {0:c} causes deletes to fail!
- From: "Scott M." <smar@xxxxxxxxxxxxx>
- Date: Sun, 9 Dec 2007 12:55:24 -0500
I'll try it Joe. Thanks!
"Joe T" <JoeT@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:2DFD5451-9BCF-401C-BC1D-BF7303CB548F@xxxxxxxxxxxxxxxx
Hello,
Had this same issue. Change your delete parameter to string from decimal
in
your sqldatasource and it should work.
Joe T
"Steven Cheng[MSFT]" wrote:
Got it! Nice to hear from you. Feel free to take care of your first
priority work:)
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Scott M." <smar@xxxxxxxxxxxxx><NimBqkYMIHA.4200@xxxxxxxxxxxxxxxxxxxxxx>
References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9@xxxxxxxxxxxxx>
<utgxRwgMIHA.3916@xxxxxxxxxxxxxxxxxxxx>
<J4zAmnVNIHA.7908@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: 2nd Post - {0:c} causes deletes to fail!
Date: Mon, 3 Dec 2007 19:47:39 -0500
repro
Hi Steven,
Yes, I'm still busy but haven't fogotten about this. I am very
interested
in figuring this out. I'll post back when I can.
Thanks,
Scott
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:J4zAmnVNIHA.7908@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Scott,
Any progress on this? If you're busy on some other work currently,
feel
free to followup at your convenience. I'll keep monitoring here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
From: "Scott M." <smar@xxxxxxxxxxxxx><NimBqkYMIHA.4200@xxxxxxxxxxxxxxxxxxxxxx>
References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9@xxxxxxxxxxxxx>
Subject: Re: 2nd Post - {0:c} causes deletes to fail!gridview
Date: Wed, 28 Nov 2007 17:16:29 -0500
Ok Steven,
Give me a little time to put it together and I'll get it off to you.
Thanks.
"Steven Cheng[MSFT]" <stcheng@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:NimBqkYMIHA.4200@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Scott,
For the problem, in the previous thread, as I didn't get the same
display, I think it maybe caused by the culture setting which
control
the
currency formatting. To make the simplify the test, would you send
me a
simple web project(with a page and a test SQL Express DB) that can
again:it? You can send it to me through the following address:
"stcheng" + "@" + "microsoft.com";
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no
rights.
--------------------
Reply-To: "Scott M." <smar@xxxxxxxxxxxxx>
From: "Scott M." <smar@xxxxxxxxxxxxx>
Subject: 2nd Post - {0:c} causes deletes to fail!
Date: Tue, 27 Nov 2007 10:11:13 -0500
I didn't get an answer on this the first time around, so I'll try
thatsolution.....=====================================
I've seen many posts complaining about this, but none with a
I have a GridView that is bound to a SQLDataSource and working just
fine,
except that when I change the DataFormatString on one of my columns
ratherinisdata
displaying a smallmoney value from SQL (converted to double by .NET
Framework) to {0:c}, I get an Input String Was Not In Correct Format
exception when I attempt to delete a record. Editing works just
fine.
I know that the problem is that when the delete takes place, the
field
displayed in the GridView contains something like $299.95, which isclearly
not a double and not the same as the orginal value gotten from theexception
datasource (even if the Input String Was Not In The Correct Format
didn't occur, the DELETE command wouldn't delete the record becuase
the
displayed data doesn't match the orginial data).
How do I fix this so that when the delete takes place, the data is
back
theit's original (unformatted) form. I've tried stripping the "$" and","
the
out of the value in the RowDeleting event handler to no avail.
I've encountered a similar problem with another field I'm pulling
from
datasource. It's a path to an image (string data). The path needslittle
a
adjustment to make it correct for a given application's location and
so
simple concatenation is done to the custom databinding expression to
make
the path correct and be able to show the data as an actual image,
thisthan as a string. That all works fine, but now the underlying fieldis
data
again different than the original data in the database, so deleting
record doesn't cause an error, it just doesn't actaully do themy
delete.
Any ideas how I can format my GridView data displayed without
sacraficing
ability to modify the underlying data?
.
- References:
- Re: 2nd Post - {0:c} causes deletes to fail!
- From: Steven Cheng[MSFT]
- Re: 2nd Post - {0:c} causes deletes to fail!
- From: Scott M.
- Re: 2nd Post - {0:c} causes deletes to fail!
- From: Steven Cheng[MSFT]
- Re: 2nd Post - {0:c} causes deletes to fail!
- From: Joe T
- Re: 2nd Post - {0:c} causes deletes to fail!
- Prev by Date: Re: 2nd Post - {0:c} causes deletes to fail!
- Next by Date: RE: How to catch errors when databinding
- Previous by thread: Re: 2nd Post - {0:c} causes deletes to fail!
- Next by thread: RE: Repeater with nested GridView edit problem
- Index(es):
Relevant Pages
|