![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Reply-To: "Scott M." <smar (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#3
| |||
| |||
|
|
Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#4
| |||
| |||
|
|
From: "Scott M." <smar (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! 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 (AT) online (DOT) microsoft.com> wrote in message news:NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#5
| |||
| |||
|
|
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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! 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 (AT) online (DOT) microsoft.com> wrote in message news:NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#6
| |||
| |||
|
|
From: "Scott M." <smar (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl |
|
Subject: Re: 2nd Post - {0:c} causes deletes to fail! Date: Mon, 3 Dec 2007 19:47:39 -0500 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 (AT) online (DOT) microsoft.com> wrote in message news:J4zAmnVNIHA.7908 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... 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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! 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 (AT) online (DOT) microsoft.com> wrote in message news:NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#7
| |||
| |||
|
|
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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl utgxRwgMIHA.3916 (AT) TK2MSFTNGP02 (DOT) phx.gbl J4zAmnVNIHA.7908 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! Date: Mon, 3 Dec 2007 19:47:39 -0500 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 (AT) online (DOT) microsoft.com> wrote in message news:J4zAmnVNIHA.7908 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... 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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! 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 (AT) online (DOT) microsoft.com> wrote in message news:NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
#8
| |||
| |||
|
|
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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl utgxRwgMIHA.3916 (AT) TK2MSFTNGP02 (DOT) phx.gbl J4zAmnVNIHA.7908 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! Date: Mon, 3 Dec 2007 19:47:39 -0500 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 (AT) online (DOT) microsoft.com> wrote in message news:J4zAmnVNIHA.7908 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... 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 (AT) nospam (DOT) nospam References: <A15E4C9B-A479-4C0D-8D92-1B7C6C4A38F9 (AT) microsoft (DOT) com NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl Subject: Re: 2nd Post - {0:c} causes deletes to fail! 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 (AT) online (DOT) microsoft.com> wrote in message news:NimBqkYMIHA.4200 (AT) TK2MSFTNGHUB02 (DOT) phx.gbl... Hi Scott, For the problem, in the previous thread, as I didn't get the same gridview 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 repro 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 (AT) nospam (DOT) nospam From: "Scott M." <smar (AT) nospam (DOT) nospam 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 again: ===================================== I've seen many posts complaining about this, but none with a solution..... 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 that is 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 data displayed in the GridView contains something like $299.95, which is clearly not a double and not the same as the orginal value gotten from the datasource (even if the Input String Was Not In The Correct Format exception 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 in it'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 the datasource. It's a path to an image (string data). The path needs a little 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, rather than as a string. That all works fine, but now the underlying field data is again different than the original data in the database, so deleting this record doesn't cause an error, it just doesn't actaully do the delete. Any ideas how I can format my GridView data displayed without sacraficing my ability to modify the underlying data? |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |