<?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: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/2546724.aspx</link><pubDate>Fri, 08 Aug 2008 21:14:37 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2546724</guid><dc:creator>pluns</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2546724.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2546724</wfw:commentRss><description>&lt;p&gt;Gentle people,&lt;br /&gt;&lt;br /&gt;The following code fixed it for me:&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; GridView2_RowUpdated(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;GridViewUpdatedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e) &lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.KeepInEditMode = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.ExceptionHandled = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;true&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;; &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;protected&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; GridView2_RowUpdating(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;GridViewUpdateEventArgs&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// find entry in iatTable&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XmlDocument&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;myXMLDoc = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.XmlDataSource2.GetXmlDocument();&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sElemId = e.Keys[0].ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XmlNode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; selElement = myXMLDoc.GetElementById(sElemId);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sAttributeName = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Empty;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; foreach&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;XmlNode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; attr &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;in&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; selElement.Attributes)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;try&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sAttributeName = attr.Name.ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selElement.Attributes[sAttributeName].Value = e.NewValues[sAttributeName].ToString();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;catch&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000"&gt;//&amp;nbsp;catch exceptions when Attribute cannot be written to ( e.g. Keys)&lt;/font&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myTrace.Information(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;No value to copy for: &amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;+ sAttributeName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font size="2"&gt;}&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.XmlDataSource2.Save();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.GridView2.DataBind();&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;// e.Cancel = true;&lt;br /&gt;&lt;font color="#000000"&gt;&lt;font size="2"&gt;}&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;ps. Great thread, helped me to find this solution&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/2352341.aspx</link><pubDate>Mon, 12 May 2008 14:42:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2352341</guid><dc:creator>Jeongwon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2352341.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=2352341</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;&lt;p&gt;I tried to use TemplateField instead using CommandField then it removed the error because it avoid calling method from XMLDataSource.&lt;/p&gt;&lt;p&gt;This is my sample code. For CommandName&amp;nbsp; attribute, do not use &amp;quot;Edit&amp;quot;, &amp;quot;Update&amp;quot; or &amp;quot;Cancel&amp;quot; because it will try to call specified method&amp;nbsp; from XMLDataSource and will give Error. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;lt;asp:TemplateField HeaderText = &amp;quot;Options&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ItemTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:LinkButton ID=&amp;quot;EditLinkButton&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Edit&amp;quot; CommandName=&amp;quot;EditCommand&amp;quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ItemTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;EditItemTemplate&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:LinkButton ID=&amp;quot;UpdateLinkButton&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Update&amp;quot; CommandName=&amp;quot;UpdateCommand&amp;quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;asp:LinkButton ID=&amp;quot;CancelLinkButton&amp;quot; runat=&amp;quot;server&amp;quot; Text=&amp;quot;Cancel&amp;quot; CommandName=&amp;quot;CancelCommand&amp;quot;&amp;gt;&amp;lt;/asp:LinkButton&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/EditItemTemplate&amp;gt;&lt;br /&gt;&amp;lt;/asp:TemplateField&amp;gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LinkButton sourceLinkButton = (LinkButton)e.CommandSource;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int rowIndex = ((GridViewRow)sourceLinkButton.Parent.Parent).RowIndex;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (e.CommandName == &amp;quot;EditCommand&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.EditIndex = rowIndex;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (e.CommandName == &amp;quot;UpdateCommand&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* Update method will be here */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.EditIndex = -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;  GridView1.DataBind();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (e.CommandName == &amp;quot;CancelCommand&amp;quot;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GridView1.EditIndex = -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;&lt;p&gt;} &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;Hope this help&lt;/p&gt;&lt;p&gt;Jeongwon&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1588206.aspx</link><pubDate>Wed, 21 Feb 2007 12:46:11 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1588206</guid><dc:creator>TonyBlundell</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1588206.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1588206</wfw:commentRss><description>&lt;p&gt;Hi all, &lt;/p&gt;&lt;p&gt;&lt;br /&gt;I think there's a slightly simpler way of doing this...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;We must handle the RowUpdating event of the GridView, as the XMLDataSource doesn't fully support updating, so...&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;Protected Sub&lt;/span&gt; gv1_RowUpdating(&lt;span class="kwd"&gt;ByVal&lt;/span&gt; sender &lt;span class="kwd"&gt;As Object&lt;/span&gt;, &lt;span class="kwd"&gt;ByVal&lt;/span&gt; e &lt;span class="kwd"&gt;As&lt;/span&gt; System.Web.UI.WebControls.GridViewUpdateEventArgs) &lt;span class="kwd"&gt;Handles&lt;/span&gt; resourcesGridView.RowUpdating

&lt;span class="cmt"&gt;' Your update code goes here.

' So the row doesn't display in edit mode...&lt;/span&gt;
	resourcesGridView.EditIndex = -1
&lt;span class="cmt"&gt;' Cancel the event, so the grid view doesn't try to make the data source do an auto update, and we avoid the 'method not supported error'...&lt;/span&gt;
	e.Cancel = &lt;span class="kwd"&gt;True

End Sub&lt;/span&gt;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Cheers,&lt;/pre&gt;&lt;pre class="coloredcode"&gt;Tony&amp;nbsp;&lt;/pre&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1419661.aspx</link><pubDate>Thu, 05 Oct 2006 19:06:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1419661</guid><dc:creator>timbratcher</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1419661.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1419661</wfw:commentRss><description>&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; gv1_RowUpdating(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Web.UI.WebControls.GridViewUpdateEventArgs) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; gv1.RowUpdating&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;#39; code for updating row manually goes here&lt;br /&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;Sub&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Protected&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; gv1_RowUpdated(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; sender &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Object&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; e &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; System.Web.UI.WebControls.GridViewUpdatedEventArgs) &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Handles&lt;/font&gt;&lt;font size="2"&gt; gv1.RowUpdated&lt;br /&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#39; this prevents the&amp;nbsp;error &amp;quot;Specified method is not supported.&amp;quot; from being displayed.&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.ExceptionHandled = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;True&lt;br /&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;Sub&lt;/font&gt;&lt;/p&gt;&lt;/font&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#000000"&gt;&amp;quot;cancel the RowUpdate by setting the event argument&amp;#39;s Cancel property to true&amp;quot;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;I guess that should be something like &amp;quot;set the event&amp;#39;s ExceptionHandled property to True.&amp;quot;&lt;/p&gt;&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1286118.aspx</link><pubDate>Mon, 15 May 2006 16:04:35 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1286118</guid><dc:creator>sleekdigital</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1286118.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1286118</wfw:commentRss><description>I will check out Mikes Updatable Xml DataSource control.&amp;nbsp; But I'd like the answer to this question as well.&amp;nbsp; I am handeling the &lt;strong&gt;RowUpdated &lt;/strong&gt;event myself, but I still get the "&lt;em&gt;Specified method is not supported"&lt;/em&gt; error.&amp;nbsp; Do I maybe need to also handle the RowUpdating event as well?&amp;nbsp; And what is this about ... "cancel the RowUpdate by setting the event argument's Cancel property to true".&amp;nbsp; I don't see any way of manipulating event arguments.&amp;nbsp; Please help us understand that better.&amp;nbsp; Thanks.</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1273232.aspx</link><pubDate>Mon, 01 May 2006 23:46:13 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1273232</guid><dc:creator>Mike Chaliy</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1273232.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1273232</wfw:commentRss><description>&lt;p&gt;Hello.&lt;/p&gt;
&lt;p&gt;I think I have solution for you. Please review my &lt;a href="http://www.chaliy.com/Sources/UpdatableXmlDataSource/Default.aspx"&gt;.Net 2.0 Updatable Xml DataSource&lt;/a&gt;. It is updatabale XmlDataSource implemenation. This mean that it support automatic inserting, updating and deleting. As bonus it supports paging and sorting.&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140186.aspx</link><pubDate>Tue, 13 Dec 2005 08:10:05 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140186</guid><dc:creator>danh74</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140186.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140186</wfw:commentRss><description>&lt;p&gt;&lt;strong&gt;What you can do is handle the GridView's RowUpdating event, manually update the XML data in the XmlDataSource by calling GetXmlDocument(), call the Save() method, &lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I did exactly that&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;and finally cancel the RowUpdating event (so that the GridView doesn't try to make the data source do an automatiac update).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Can you explain how can i do it?&lt;/p&gt;
&lt;p&gt;TIA&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140185.aspx</link><pubDate>Tue, 13 Dec 2005 08:09:51 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140185</guid><dc:creator>Fredrik N</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140185.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140185</wfw:commentRss><description>&lt;p&gt;If you use an XmlDataSource control and added an Update command button to update the Row, you will get the NotSupported exception because the GridView will call the Update method of the XmlDataSource's XmlDataSourceView. The XmlDataSource don't support updates and of that reason the XmlDataSourceView's Update method will throw the NotSupported Exception.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;To remove the exception you have to cancel the RowUpdate by setting the event argument's Cancel property to true. By doing that the XmlDataSourceView's Update method will not be called.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p&gt;The only way to update the document when you use the XmlDataSource is to add the update logic to the RowUpdating event by your self (You need to handle the update). I have an example on my blog where I use the XmlDataSource to update the XML document; it can probably give you some idea: &lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;
&lt;p class=MsoNormal&gt;&lt;o:p&gt;&amp;nbsp;&lt;/o:p&gt;&lt;a href="http://fredrik.nsquared2.com/viewpost.aspx?PostID=270"&gt;http://fredrik.nsquared2.com/viewpost.aspx?PostID=270&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140181.aspx</link><pubDate>Tue, 13 Dec 2005 08:03:54 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140181</guid><dc:creator>Eilon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140181.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140181</wfw:commentRss><description>&lt;p&gt;I'm sorry, what I meant was that the data source does not support automatic insert/update/delete through its IDataSourceControl/DataSourceView interfaces, which is what GridView uses. What you can do is handle the GridView's RowUpdating event, manually update the XML data in the XmlDataSource by calling GetXmlDocument(), call the Save() method, and finally cancel the RowUpdating event (so that the GridView doesn't try to make the data source do an automatiac update).&lt;/p&gt;
&lt;p&gt;The reason you don't get an error when you call Response.End() is that it does exactly that - it ends the response - so the XmlDataSource never has a chance to throw its exception.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eilon&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140174.aspx</link><pubDate>Tue, 13 Dec 2005 07:47:38 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140174</guid><dc:creator>danh74</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140174.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140174</wfw:commentRss><description>&lt;p&gt;In the msdn Microsoft say it can.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.xmldatasource.aspx"&gt;http://msdn2.microsoft.com/en-us/library/system.web.ui.webcontrols.xmldatasource.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The XmlDataSource can return XmlDataDocument and it also have Save function.&lt;/p&gt;
&lt;p&gt;This is very strange error i have here. &lt;/p&gt;
&lt;p&gt;i am getting the error even if the function is empty , but while i am adding&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Response.Write("someText");&lt;/p&gt;
&lt;p&gt;Response.End();&lt;/p&gt;
&lt;p&gt;I am getting no error. &lt;/p&gt;
&lt;p&gt;While i am removing the Response.End(); i am getting the error again.&lt;/p&gt;
&lt;p&gt;TIA&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140169.aspx</link><pubDate>Tue, 13 Dec 2005 07:34:21 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140169</guid><dc:creator>Eilon</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140169.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140169</wfw:commentRss><description>&lt;p&gt;The XmlDataSource does not support updating. Of the data sources that ship with ASP.net 2.0 only SqlDataSource and ObjectDataSource support insert/update/delete.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Eilon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1140154.aspx</link><pubDate>Tue, 13 Dec 2005 07:04:40 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1140154</guid><dc:creator>danh74</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1140154.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1140154</wfw:commentRss><description>&lt;p&gt;can someone&amp;nbsp; help here please.&lt;/p&gt;
&lt;p&gt;TIA&lt;/p&gt;</description></item><item><title>Error -System.NotSupportedException: Specified method is not supported.</title><link>http://forums.asp.net/thread/1139742.aspx</link><pubDate>Mon, 12 Dec 2005 22:07:33 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:1139742</guid><dc:creator>danh74</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/1139742.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=24&amp;PostID=1139742</wfw:commentRss><description>&lt;p&gt;hi,&lt;/p&gt;
&lt;p&gt;I am using GridView and XmlDataSource to display and edit XML file.&lt;/p&gt;
&lt;p&gt;The&amp;nbsp;error happen while i am in the update event handler (OnRowUpdating).&lt;/p&gt;
&lt;p&gt;I notice that the error happen even if there is noting in the event handler.&lt;/p&gt;
&lt;p&gt;I have no idea what the problem is.&lt;/p&gt;
&lt;p&gt;TIA&lt;/p&gt;</description></item></channel></rss>