<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Data Presentation Controls</title><link>http://forums.asp.net/24.aspx</link><description>ASP.NET data-bound controls such as the DataGrid, DataList, GridView, FormView, DetailsView, and Repeater Controls.  &lt;a href="http://aspadvice.com/SignUp/list.aspx?l=23&amp;c=17" target="_blank"&gt;Email List&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1538039.aspx</link><pubDate>Thu, 18 Jan 2007 15:29:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1538039</guid><dc:creator>Skip_Frog</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1538039.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1538039</wfw:commentRss><description>&lt;p&gt;Thanks for your help.&amp;nbsp;I have taken your advice and placed a label outside of the control and all is fine.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1536586.aspx</link><pubDate>Wed, 17 Jan 2007 18:27:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1536586</guid><dc:creator>Dave Sussman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1536586.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1536586</wfw:commentRss><description>&lt;p&gt;OK, straight from the ASP.NET development team comes this reply:&amp;nbsp;&lt;/p&gt;
&lt;p class=MsoNormal style="MARGIN:0cm 0cm 0pt;"&gt;&lt;span style="FONT-SIZE:10pt;COLOR:purple;FONT-FAMILY:'Comic Sans MS';mso-ansi-language:EN-US;"&gt;Setting certain properties forces the DetailsView (or the GridView or the FormView) to re-databind to reflect the new values.&amp;nbsp; HeaderText on the fields is one of those properties.&amp;nbsp; If the control didn’t rebind, setting the HeaderText to anything (even “Wibble”) wouldn’t do anything until you call DataBind explicitly.&amp;nbsp; Since our goal with the new data controls was to not require the user to call DataBind explicitly in all mainline scenarios, we need to call DataBind if properties that affect the rendering or control tree are changed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;This makes sense and fits with the control. &lt;/p&gt;
&lt;p&gt;So the best approach would be to have your messages outside of the control, or as templated columns.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1535800.aspx</link><pubDate>Wed, 17 Jan 2007 09:19:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1535800</guid><dc:creator>Dave Sussman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1535800.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1535800</wfw:commentRss><description>&lt;p&gt;You're right, what a strange situation. I would report this as a bug at the MSDN Feedback centre (&lt;a href="https://connect.microsoft.com/feedback/"&gt;https://connect.microsoft.com/feedback/&lt;/a&gt;). Anything reported here gets through to the development team. If this is a blocking issue you can report it to Product Support and investigation will be escalated and maybe a patch would be created.&lt;/p&gt;
&lt;p&gt;In the mean time, as a workaround, you can manually repopulate the fields from the NewValues collection; it's not a great solution, but would allow you to keep working.&lt;/p&gt;
&lt;p&gt;Alternatively, don't set the title text, but maybe have a label outside of the DetailsView that you update with error/warning messages. Or you could tempalte all of your fields and add a field alongside, to the right.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1534586.aspx</link><pubDate>Tue, 16 Jan 2007 15:44:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534586</guid><dc:creator>Skip_Frog</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534586.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1534586</wfw:commentRss><description>&lt;p&gt;It looks like setting the header text is the culprit. Any thoughts.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1534583.aspx</link><pubDate>Tue, 16 Jan 2007 15:44:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534583</guid><dc:creator>Dave Sussman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534583.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1534583</wfw:commentRss><description>&lt;p&gt;That's very odd, I've no idea why it should cause a problem. Is it both lines of code that cause the issue, or just setting the HeaderText?&lt;/p&gt;
&lt;p&gt;d&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1534569.aspx</link><pubDate>Tue, 16 Jan 2007 15:36:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534569</guid><dc:creator>Skip_Frog</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534569.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1534569</wfw:commentRss><description>&lt;p&gt;Yeah I started removing code and found the commented out lines below cause this behavior. Running it this way (commented out) everything is good.. Any thoughts on why this would be happenning?&lt;/p&gt;&lt;font color=#008000 size=2&gt;&lt;font color=#0000ff size=2&gt;
&lt;p&gt;If&lt;/p&gt;&lt;/font&gt;&lt;font color=#000000 size=2&gt; Check_CA &amp;lt; 4 &lt;/font&gt;&lt;font color=#0000ff size=2&gt;Then&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;CA = e.NewValues(&lt;/p&gt;&lt;/font&gt;&lt;font color=#800000 size=2&gt;"Corrective_Action"&lt;/font&gt;&lt;font size=2&gt;)
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;If&lt;/font&gt;&lt;font size=2&gt; Len(CA) &amp;lt; 20 &lt;/font&gt;&lt;font color=#0000ff size=2&gt;Then&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;'Me.DetailsView1.Fields(12).HeaderText = "C/A is required"&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;'Me.DetailsView1.Fields(12).HeaderStyle.ForeColor = Drawing.Color.Red&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;e.Cancel = &lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;True&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;'Exit Sub&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;End&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;If&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;Else&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;'Me.DetailsView1.Fields(12).HeaderText = "Corrective Action"&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#008000 size=2&gt;'Me.DetailsView1.Fields(12).HeaderStyle.ForeColor = Drawing.Color.Black&lt;/font&gt;&lt;font size=2&gt;
&lt;p&gt;&lt;/p&gt;&lt;/font&gt;&lt;font color=#0000ff size=2&gt;End&lt;/font&gt;&lt;font size=2&gt; &lt;/font&gt;&lt;font color=#0000ff size=2&gt;If&lt;/font&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color=#0000ff size=2&gt;&amp;nbsp;Thanks&lt;/font&gt;&lt;font color=#0000ff size=2&gt;&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;font color=#008000 size=2&gt;&amp;nbsp;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1534435.aspx</link><pubDate>Tue, 16 Jan 2007 14:24:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534435</guid><dc:creator>Dave Sussman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534435.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1534435</wfw:commentRss><description>&lt;p&gt;Do you have any other binding code that would be refreshing these values? When I created a test page with just a SqlDataSource and FormView control (no code) it worked for me.&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1534427.aspx</link><pubDate>Tue, 16 Jan 2007 14:20:34 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1534427</guid><dc:creator>Skip_Frog</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1534427.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1534427</wfw:commentRss><description>&lt;p&gt;No when I cancel the updating event, the Details view is indeed left in edit but the original values are returned. &lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item><item><title>Re: Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1530863.aspx</link><pubDate>Sat, 13 Jan 2007 10:53:24 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1530863</guid><dc:creator>Dave Sussman</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1530863.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1530863</wfw:commentRss><description>&lt;p&gt;When you cancel the Updating event, the DetailsView is left in edit mode and the values you entered are not changed. Is this not the behaviour you are seeing?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;If you want to manipulate the values in the DetailsView you can iterate through the Rows collection (one row for each field displayed), and then the Cells collection (two cells: the header, the value).&lt;/p&gt;
&lt;p&gt;Dave&lt;/p&gt;</description></item><item><title>Details View ItemUpdating e.cancel</title><link>http://forums.asp.net/thread/1530500.aspx</link><pubDate>Fri, 12 Jan 2007 22:23:56 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1530500</guid><dc:creator>Skip_Frog</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1530500.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1530500</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;When I use the e.cancel=true in the item updating event it cancels the update which I want. But it also returns the original values which I do not want. So how do I keep the new values?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;</description></item></channel></rss>