iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I have a webgrid with an EditType="Dropdownlist" like this:
<ISWebGrid:WebGridColumn Caption="Bank" DataMember="BankID" FilterEditType="DropdownList" Name="BankID" Width="240px" DataType="System.Int32" EditType="DropdownList"> <ValueList DataSourceID="SqlDataBanks" DataTextField="BankName" DataValueField="BankID"> </ValueList> </ISWebGrid:WebGridColumn>
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.
Any ideas?
Thanks, Beryl
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.
protected void Button2_Click(object sender, EventArgs e) { WebGrid1.ClearCachedDataSource(); WebGrid1.RebindDataSource(); }
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.
Please have the attached sample tested on your end and let us hear your feedback.
Hope this helps.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname