title: Can not update Column bound by an Image field in gridview asp.net
body: <p>I have three columns in my Grid view named TweetText, TweetImageUrl and an Column of ImageFied
  whose DataImageUrl Field is TweetImageURl. My problem is that When i use the Edit,update feature of grid, I cant edit/update the TweetImageUrl but I can Update TweetText. But when I remove The ImageField Column then I can update the TweetImageUrl Column too. So Can anyone help so that i can Update the TweetImageUrl with ImageField there in Grid Too?</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
          AutoGenerateColumns="False" DataKeyNames="TwitterUserId" 
          DataSourceID="SqlDataSource1" onrowcommand="GridView1_RowCommand" 
             PageSize="14" &gt;
              &lt;Columns&gt;
                  &lt;asp:CommandField ShowDeleteButton="True" ShowEditButton="True" /&gt;
              &lt;asp:TemplateField&gt;
                    &lt;ItemTemplate&gt;
                      &lt;asp:LinkButton ID="Approve" runat="server" 
                        CommandName="Approve" 
                        CommandArgument="&lt;%# ((GridViewRow) Container).RowIndex %&gt;"
                        Text="Approve" /&gt;
  
                    &lt;/ItemTemplate&gt; 
                  &lt;/asp:TemplateField&gt;
              &lt;asp:BoundField DataField="TweetText" HeaderText="TweetText" 
                  SortExpression="TweetText" /&gt;
              &lt;asp:BoundField DataField="TweetImageUrl" HeaderText="TweetImageUrl"
                  SortExpression="TweetImageUrl" /&gt;
                  &lt;asp:ImageField DataImageUrlField="TweetImageUrl" HeaderText="Images"  ItemStyle-Height = "10px" ItemStyle-Width = "10px"
                      NullImageUrl="~/Admin/ajax-loader.gif"&gt;
                  &lt;/asp:ImageField&gt;
                         &lt;/Columns&gt;
              &lt;PagerSettings Mode="NextPreviousFirstLast" /&gt;
      &lt;/asp:GridView&gt;
  
     &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
      ConflictDetection="CompareAllValues" 
      ConnectionString="&lt;%$ ConnectionStrings:mistersmartyplantsConnectionString %&gt;" 
      DeleteCommand="DELETE FROM [TwitterData] WHERE [TwitterUserId] = @original_TwitterUserId AND (([TweetId] = @original_TweetId) OR ([TweetId] IS NULL AND @original_TweetId IS NULL)) AND (([TwitterUserName] = @original_TwitterUserName) OR ([TwitterUserName] IS NULL AND @original_TwitterUserName IS NULL)) AND (([TweetText] = @original_TweetText) OR ([TweetText] IS NULL AND @original_TweetText IS NULL)) AND (([TweetImageUrl] = @original_TweetImageUrl) OR ([TweetImageUrl] IS NULL AND @original_TweetImageUrl IS NULL)) AND (([TwitterDate] = @original_TwitterDate) OR ([TwitterDate] IS NULL AND @original_TwitterDate IS NULL))" 
      InsertCommand="INSERT INTO [TwitterData] ([TweetId], [TwitterUserId], [TwitterUserName], [TweetText], [TweetImageUrl], [TwitterDate]) VALUES (@TweetId, @TwitterUserId, @TwitterUserName, @TweetText, @TweetImageUrl, @TwitterDate)" 
      OldValuesParameterFormatString="original_{0}" 
      SelectCommand="SELECT [TweetId], [TwitterUserId], [TwitterUserName], [TweetText], [TweetImageUrl], [TwitterDate] FROM [TwitterData] WHERE ([Approved] = @Approved) ORDER BY [TwitterDate] DESC" 
      UpdateCommand="UPDATE [TwitterData] SET [TweetId] = @TweetId, [TwitterUserName] = @TwitterUserName, [TweetText] = @TweetText, [TweetImageUrl] = @TweetImageUrl, [TwitterDate] = @TwitterDate WHERE [TwitterUserId] = @original_TwitterUserId AND (([TweetId] = @original_TweetId) OR ([TweetId] IS NULL AND @original_TweetId IS NULL)) AND (([TwitterUserName] = @original_TwitterUserName) OR ([TwitterUserName] IS NULL AND @original_TwitterUserName IS NULL)) AND (([TweetText] = @original_TweetText) OR ([TweetText] IS NULL AND @original_TweetText IS NULL)) AND (([TweetImageUrl] = @original_TweetImageUrl) OR ([TweetImageUrl] IS NULL AND @original_TweetImageUrl IS NULL)) AND (([TwitterDate] = @original_TwitterDate) OR ([TwitterDate] IS NULL AND @original_TwitterDate IS NULL))"&gt;
      &lt;DeleteParameters&gt;
          &lt;asp:Parameter Name="original_TwitterUserId" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetId" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TwitterUserName" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetText" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetImageUrl" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TwitterDate" Type="String" /&gt;
      &lt;/DeleteParameters&gt;
      &lt;InsertParameters&gt;
          &lt;asp:Parameter Name="TweetId" Type="String" /&gt;
          &lt;asp:Parameter Name="TwitterUserId" Type="String" /&gt;
          &lt;asp:Parameter Name="TwitterUserName" Type="String" /&gt;
          &lt;asp:Parameter Name="TweetText" Type="String" /&gt;
          &lt;asp:Parameter Name="TweetImageUrl" Type="String" /&gt;
          &lt;asp:Parameter Name="TwitterDate" Type="String" /&gt;
      &lt;/InsertParameters&gt;
      &lt;SelectParameters&gt;
          &lt;asp:Parameter DefaultValue="No" Name="Approved" Type="String" /&gt;
      &lt;/SelectParameters&gt;
      &lt;UpdateParameters&gt;
          &lt;asp:Parameter Name="TweetId" Type="String" /&gt;
          &lt;asp:Parameter Name="TwitterUserName" Type="String" /&gt;
          &lt;asp:Parameter Name="TweetText" Type="String" /&gt;
          &lt;asp:Parameter Name="TweetImageUrl" Type="String" /&gt;
          &lt;asp:Parameter Name="TwitterDate" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TwitterUserId" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetId" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TwitterUserName" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetText" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TweetImageUrl" Type="String" /&gt;
          &lt;asp:Parameter Name="original_TwitterDate" Type="String" /&gt;
      &lt;/UpdateParameters&gt;
  &lt;/asp:SqlDataSource&gt;
  </code></pre>