{"id":792,"date":"2011-05-10T10:47:44","date_gmt":"2011-05-10T14:47:44","guid":{"rendered":"http:\/\/www.iowawebnet.com\/ein\/?p=792"},"modified":"2011-05-10T10:47:44","modified_gmt":"2011-05-10T14:47:44","slug":"gridview-drop-down-list-record-update","status":"publish","type":"post","link":"https:\/\/www.iowawebnet.com\/ein\/2011\/05\/gridview-drop-down-list-record-update\/","title":{"rendered":"GridView drop-down list record update:"},"content":{"rendered":"<p>Found this code on msdn library and use it all the time. Code is pretty straight forward and easy to implement and customizable. Have fun using it.<\/p>\n<p><a rel=\"attachment wp-att-788\" href=\"http:\/\/www.iowawebnet.com\/ein\/?attachment_id=788\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-788\" title=\"IC63039\" src=\"http:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/04\/IC63039.gif\" alt=\"\" width=\"450\" height=\"398\" srcset=\"https:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/04\/IC63039.gif 450w, https:\/\/www.iowawebnet.com\/ein\/wp-content\/uploads\/2011\/04\/IC63039-300x265.gif 300w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/a><\/p>\n<blockquote>\n<pre>&lt;asp:TemplateField SortExpression=\"CategoryName\" \r\nHeaderText=\"CategoryName\"&gt;\r\n   &lt;EditItemTemplate&gt;\r\n        &lt;asp:DropDownList ID=\"DropDownList1\" Runat=\"server\" \r\n          DataSourceID=\"categoryDataSource\"\r\n            DataTextField=\"CategoryName\" DataValueField=\"CategoryID\" \r\n            SelectedValue='&lt;%# Bind(\"CategoryID\") %&gt;'&gt;\r\n        &lt;\/asp:DropDownList&gt;        \r\n   &lt;\/EditItemTemplate&gt;\r\n   &lt;ItemTemplate&gt;\r\n       &lt;asp:Label Runat=\"server\" Text='&lt;%# Bind(\"CategoryName\") %&gt;' \r\n          ID=\"Label1\"&gt;&lt;\/asp:Label&gt;\r\n   &lt;\/ItemTemplate&gt;\r\n&lt;\/asp:TemplateField&gt;<\/pre>\n<\/blockquote>\n<p>For more related code read <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms972948.aspx\" target=\"_blank\">here&#8230;<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Found this code on msdn library and use it all the time. Code is pretty straight forward and easy to implement and customizable. Have fun using it. &lt;asp:TemplateField SortExpression=&#8221;CategoryName&#8221; HeaderText=&#8221;CategoryName&#8221;&gt; &lt;EditItemTemplate&gt; &lt;asp:DropDownList ID=&#8221;DropDownList1&#8243; Runat=&#8221;server&#8221; DataSourceID=&#8221;categoryDataSource&#8221; DataTextField=&#8221;CategoryName&#8221; DataValueField=&#8221;CategoryID&#8221; SelectedValue='&lt;%# Bind(&#8220;CategoryID&#8221;) %&gt;&#8217;&gt; &lt;\/asp:DropDownList&gt; &lt;\/EditItemTemplate&gt; &lt;ItemTemplate&gt; &lt;asp:Label Runat=&#8221;server&#8221; Text='&lt;%# Bind(&#8220;CategoryName&#8221;) %&gt;&#8217; ID=&#8221;Label1&#8243;&gt;&lt;\/asp:Label&gt; &lt;\/ItemTemplate&gt; &lt;\/asp:TemplateField&gt; For more related code [&hellip;]<\/p>\n","protected":false},"author":35,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,16],"tags":[19,42,45],"class_list":["post-792","post","type-post","status-publish","format-standard","hentry","category-applications","category-net","tag-asp-net","tag-gridview","tag-record-update"],"_links":{"self":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/792"}],"collection":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/users\/35"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/comments?post=792"}],"version-history":[{"count":10,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/792\/revisions"}],"predecessor-version":[{"id":805,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/posts\/792\/revisions\/805"}],"wp:attachment":[{"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/media?parent=792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/categories?post=792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iowawebnet.com\/ein\/wp-json\/wp\/v2\/tags?post=792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}