﻿<?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 - How to refresh valuelist in webgrid EditType="DropDownList"?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-refresh-valuelist-in-webgrid-EditTypeDropDownList/</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>How to refresh valuelist in webgrid EditType="DropDownList"?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-refresh-valuelist-in-webgrid-EditTypeDropDownList/</link><pubDate>Mon, 17 Oct 2011 00:52:36 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;You need to invoke the ClearCachedDataSource() method. ClearCachedDataSource method is used to clear the cache of the data source. After the cache has been cleared, user can use the RebindDataSource method to rebind the data source.&lt;/span&gt;&lt;/p&gt;&lt;pre&gt;protected void Button2_Click(object sender, EventArgs e)
{
    WebGrid1.ClearCachedDataSource();
    WebGrid1.RebindDataSource();
}&lt;/pre&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;A simple sample of WebGrid’s page was created based on the description of your scenario. WebGrid1 has “DropDownList” EditType on the “Category” column. A WebDialogBox, WebDialogBox1, containing another WebGrid, WebGrid2, is used so that user can add values to the Category list. After user add a new “Category”, click the “Refresh” button to invoke the ClearCachedDataSource and RebindDataSource method.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Please have the attached sample tested on your end and let us hear your feedback.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family: 'segoe ui','sans-serif'; color: #1f497d; font-size: 9pt"&gt;Hope this helps.&lt;/span&gt;&lt;/p&gt;</description></item><item><title>How to refresh valuelist in webgrid EditType="DropDownList"?</title><link>http://www.intersoftsolutions.com/Community/WebGrid/How-to-refresh-valuelist-in-webgrid-EditTypeDropDownList/</link><pubDate>Fri, 14 Oct 2011 07:23:59 GMT</pubDate><dc:creator>bbucher</dc:creator><description>&lt;p&gt;I have a webgrid with an EditType="Dropdownlist" like this:&lt;/p&gt;&lt;pre&gt;                &amp;lt;ISWebGrid:WebGridColumn Caption="Bank" DataMember="BankID" FilterEditType="DropdownList"
                    Name="BankID" Width="240px" DataType="System.Int32" EditType="DropdownList"&amp;gt;
                    &amp;lt;ValueList DataSourceID="SqlDataBanks" DataTextField="BankName" 
                        DataValueField="BankID"&amp;gt;
                    &amp;lt;/ValueList&amp;gt;
                &amp;lt;/ISWebGrid:WebGridColumn&amp;gt;
&lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;It works fine, except there's also a webdialog on the page so that the user can add values to the Bank List.  After the user adds a bank, I refresh the datasource (SqlDataBanks), I refresh the grid, I rebind the grid, etc., but the dropdown list itself won't refresh to include the new bank. &lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;
&lt;p&gt;Thanks,  Beryl&lt;/p&gt;</description></item></channel></rss>