﻿<?xml version="1.0" encoding="utf-8"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Intersoft Community - WebGrid Enterprise - DropDownList CellTemplate w/ Editing/Sorting/Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/DropDownList-CellTemplate-w-EditingSortingPaging/</link><description /><generator>http://www.intersoftsolutions.com</generator><language>en</language><copyright>Copyright 2002 - 2015 Intersoft Solutions Corp. All rights reserved.</copyright><ttl>60</ttl><item><title>DropDownList CellTemplate w/ Editing/Sorting/Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/DropDownList-CellTemplate-w-EditingSortingPaging/</link><pubDate>Tue, 22 Jun 2010 14:53:41 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;Thanks Yudi. I was able to work with this code to achieve my goal here.  You had:&lt;/p&gt;&lt;pre&gt;cells.GetNamedItem("Legal").SetText(val, true);
cells.GetNamedItem("Legal").SetText(val);
row.SetDataChanged();
WebGrid1.MarkEdit();&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;I changed it to:&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;pre&gt;cells.GetNamedItem("Legal").SetText(val, true);
row.Update();&lt;/pre&gt;&lt;/span&gt;
&lt;p&gt;Using Update() worked a bit better for our situation and I didn't want to call SetText() twice. I wasn't sure if you intended to call it twice for some reason or if it was a mistake but I took out the second call and it worked fine.&lt;/p&gt;
&lt;p&gt;Thanks again,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;</description></item><item><title>DropDownList CellTemplate w/ Editing/Sorting/Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/DropDownList-CellTemplate-w-EditingSortingPaging/</link><pubDate>Fri, 18 Jun 2010 06:42:50 GMT</pubDate><dc:creator>yudi</dc:creator><description>&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;When using the &lt;em&gt;Template Column Type&lt;/em&gt;, you can put any server side controls inside the &lt;em&gt;CellTemplate&lt;/em&gt; property of the WebGridColumn. However, editing is not affected with Templated Column. This means that we will still need to handle the insert, update, and delete event through the template column.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;I enclosed one simple sample of WebGrid with template column. The grid is bind to ‘Customers’ table of Northwind database. ‘ContactTitle’ column uses template column where ASP.Net DropDownList is put inside the CellTemplate of the column.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;When users click the DropDownList control and modify the selected value, WebGrid is actually not accepting the changes directly. We will need to set the text and the value of the corresponding modified cell and inform WebGrid that there are changes within the row. So, when users move the focus off the row, WebGrid will validate the row and accept the changes.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;The attached sample is only a simple sample that handles simple editing action. By handling this, the changed value is retained both on FlyPostBack and Full PostBack. For more detail information, please check the attached sample.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>DropDownList CellTemplate w/ Editing/Sorting/Paging</title><link>http://www.intersoftsolutions.com/Community/WebGrid/DropDownList-CellTemplate-w-EditingSortingPaging/</link><pubDate>Thu, 17 Jun 2010 14:15:56 GMT</pubDate><dc:creator>bloveall</dc:creator><description>&lt;p&gt;We have a scenario where we have a DropDownList in a CellTemplate with values that we would like the user to be able to select. This works just fine, actually, except that when the user sorts or pages or interacts with the grid such that there is a FlyPostback (or full PostBack), the changes are lost. This is different from the behavior in the other cells, where the changed value is retained across Fly and full postbacks. How do we enable such state changes for celltemplates? I looked at the post below and even ran the sample but the sample, despite displaying a grid with the dropdownlist, does not retain the changes when the grid is sorted or paged.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Brad&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.intersoftpt.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/"&gt;http://www.intersoftpt.com/Community/WebGrid/How-do-I-initailly-set-the-WebGrid-in-Edit-Mode/&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>