﻿<?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 - WebCombo - WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</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>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Thu, 03 Dec 2009 20:58:07 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Andrzez,&lt;/p&gt;&lt;p&gt;In my sample, I even did not use ItemCreated event. All i did is in InitializeDataSource. &lt;br /&gt;Also,in my sample, i didn't clear &lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; font-size: 12px; color: rgb(63, 63, 63); line-height: 18px; "&gt;&amp;nbsp;"&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; color: rgb(163, 21, 21); font-size: 13px; "&gt;&lt;span style="font-family: 'segoe ui', arial, verdana, tahoma; color: rgb(163, 21, 21); font-size: 13px; "&gt;select * from Products"&lt;span style="color: rgb(0, 0, 0); font-family: 'lucida sans unicode'; line-height: normal; "&gt;. If WebCombo1.Text is "", WebCombo2 would bind based on WebCombo1.Text. Shouldn't this also on demand?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;In fact, ClearCacheDataSource is not clear or retrieve the list of WebCombo. &lt;br /&gt;Because of this lack, we suggested to also handled it in client side. For now, it is only available on client side.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;HAndy&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Thu, 03 Dec 2009 03:57:33 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;So we have two solutions:&lt;/p&gt;
&lt;p&gt;1. &lt;span style="text-decoration:underline;"&gt;by using DataSourceID&lt;/span&gt; , then use RegisterStartupScript with JS code which set WebComboProduct Value on the client side and make LoadValue on it&lt;/p&gt;
&lt;p&gt;2. &lt;span style="text-decoration:underline;"&gt;by using DataSource (with or without&amp;nbsp;AllowAutoQueryHandler depend on how many rows we expected)&lt;/span&gt;, then in "&lt;span style="font-size: 13px"&gt;FormView1_ItemCreated" set DataSource property to your customdata before or after setting Value on &lt;span style="font-size: 13px"&gt;WebComboProduct.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;In your example we shouldn't use clear "&lt;span style="color: #a31515; font-size: 13px"&gt;&lt;span style="color: #a31515; font-size: 13px"&gt;select * from Products"&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;I think it should be some method to retrieve list of WebCombo on demand (when the DataSourceId is in use). As you've seen the ClearCachedDataSource not working properly.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt; &lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;Regards&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size: 13px"&gt;&lt;span style="font-size: 13px"&gt;Andrzej&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Thu, 03 Dec 2009 00:22:49 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;/p&gt;&lt;p&gt;I see. So you want it also can be used in Sql syntax or query. If you use SetAdditionalFilter or LinkWebCombo, it would be handled by WebCombo automatically. &lt;/p&gt;
&lt;p&gt;For your scenario, i think Glenn approach is already the best workaround for now. But if you still want handle your Sql syntax or query manually, you can set AllowAutoQuesryHandler to false. &lt;br /&gt;With this way, you can define your sql query and parameters. &lt;br /&gt;Hope this helps. I also attached the sample.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Wed, 02 Dec 2009 05:25:33 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi Handy,&lt;/p&gt;
&lt;p&gt;Thank you for your help, but It's not acceptable method for Product list with few milion records.&lt;/p&gt;
&lt;p&gt;SetFilter method don't modify SQL syntax, but set filter only. So app have to receive all records from Product table (it's the most critical point).&lt;/p&gt;
&lt;p&gt;We can manually trigger select on any datasource (ie.&lt;/p&gt;&lt;span style="color: #008000; font-size: 13px"&gt;&lt;span style="color: #008000; font-size: 13px"&gt;&lt;pre&gt;ISDataSourceList.Tables.GetNamedItem("Products").ClearCacheAndData();
ISDataSourceList.Tables.GetNamedItem("Products").Select();
&lt;/pre&gt;

&lt;/span&gt;&lt;/span&gt;&lt;span style="color: #008000; font-size: 13px"&gt;&lt;span style="color: #008000; font-size: 13px"&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;- why it can't by binding to WebCombo.

&lt;p&gt;&lt;br /&gt;Sorry for my embarrassment, but modify WebCombo list on demand should be total base function.&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Wed, 02 Dec 2009 03:59:51 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;&lt;p&gt;To refresh WebCombo from server side, you only need WebCombo1.ClearCachedDataSource(). The only problem is, there is some time out which can also cause InitializeDataSource or ISDataSource selecting not to be called (which i don;t suggest you this way).  &lt;br /&gt;That's why also need to use client side for the validation (for better performance). There should two workarounds which are SetAdditionalFilter (which i suggest you at first) or using LinkWebCombo.&lt;/p&gt;
&lt;p&gt;I have modified your sample and use SetAdditionalFilter in there. You can see that i did not use much behind code. Hope my approach can help you.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy &lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Tue, 01 Dec 2009 03:32:21 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Your example explain how to refresh WebCombo on the client side&lt;/p&gt;
&lt;p&gt;Maybe I'm not writing clearly or you don't read carefully.&lt;/p&gt;
&lt;p&gt;I don't accept method like this:&lt;/p&gt;
&lt;p&gt; &lt;span style="color: rgb(255,0,0)"&gt;this.ClientScript.RegisterStartupScript(......&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color: rgb(255,0,0)"&gt;&lt;/span&gt;in FormView1_ItemCreated on the server side&lt;/p&gt;
&lt;p&gt;I'd like to &lt;strong&gt;refresh (prepare)&amp;nbsp;WebCombo in FormView1_ItemCreated&lt;/strong&gt; before (or after) setting his Value.&lt;/p&gt;
&lt;p&gt;Your method  WebCombo1.ClearCachedDataSource(); just not working. &lt;/p&gt;
&lt;p&gt;I've tried (copy of my first example):&lt;/p&gt;&lt;pre&gt;protected void FormView1_ItemCreated(object sender, EventArgs e)
    {
        if (FormView1.CurrentMode == FormViewMode.Edit)
        {
            DataRowView rowView = (DataRowView)FormView1.DataItem;
            if (rowView != null)
            {
                //test binding
                WebComboCategory.Value = "2";//Condiments
                WebComboProduct.ClearCachedDataSource();
                //ISDataSourceList.Tables.GetNamedItem("Products").ClearCacheAndData();
                //ISDataSourceList.Tables.GetNamedItem("Products").Select();
                WebComboProduct.Value = "3";//Aniseed Syrup
            }
        }
    } &lt;/pre&gt;

&lt;p&gt; &lt;/p&gt;
&lt;p&gt;My question is : How can I manually refresh WebCombo on the server side ?&lt;br /&gt;&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Mon, 30 Nov 2009 22:17:40 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;I already told you about how to refresh WebCombo. But if the code is not working, please try to use the additional codes below.&lt;/p&gt;&lt;p /&gt;&lt;pre&gt;var WebCombo1=ISGetObject("WebCombo1");
WebCombo1.IsDirty = true; 
WebCombo1.NeedClearList = true;
WebCombo1.Values=null;
WebCombo1.ClearSelection();
WebCombo1.RefreshValueItems();&lt;/pre&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;
&lt;p /&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Mon, 30 Nov 2009 03:17:40 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;How can I manually refresh WebComboProduct, before setting his Value ?&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Sun, 29 Nov 2009 23:12:09 GMT</pubDate><dc:creator>handy@intersoftpt.com</dc:creator><description>&lt;p&gt;Hi Andrzej,&lt;/p&gt;&lt;p&gt;I think Glenn suggestion is already the best workaround for now. At before, Set Value is not working because the datasource is empty. You can try at simple test. When WebCombo is not binded into any datasource, try to set value. Or you can also setValue with a value which does not in datasource. &lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Handy&lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Thu, 26 Nov 2009 13:55:57 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I'm sorry, but I don't understand. Where would you like to set WebComboProduct.Value to "3" or other value comming from datasource (which is binding to FormView )  ?&lt;/p&gt;
&lt;p&gt;We use similar solution with RegisterStartupScript, and set WebComboProduct on the client side, but it's workaround.&lt;/p&gt;
&lt;p&gt;Is there no other way ? ... Intersoft have to do that :-)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item><item><title>WebCombo problem with binding in FormView</title><link>http://www.intersoftsolutions.com/Community/WebCombo/WebCombo-problem-with-binding-in-FormView/</link><pubDate>Mon, 23 Nov 2009 17:36:37 GMT</pubDate><dc:creator>ands</dc:creator><description>&lt;p&gt;Hi &lt;/p&gt;
&lt;p&gt;First problem : WebCombo render empty&lt;/p&gt;
&lt;p&gt;I've two webcombo's: Category and Product.&lt;/p&gt;
&lt;p&gt;Product is based on Category&lt;/p&gt;
&lt;p&gt;In FormView_ItemCreated I set some Value to WebComboCategory and WebComboProduct, but rendered page doesn't show properly WebComboProduct list (there is no Value nor list)&lt;/p&gt;
&lt;p&gt;see example&lt;/p&gt;
&lt;p&gt;I've tried Select() on my datasource but no result (see comments in example)&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Second problem (client side):&lt;/p&gt;
&lt;p&gt;On event WebComboCategory_AfterItemSelected  I set Text and try to WebComboProduct.LoadValue();&lt;/p&gt;
&lt;p&gt;but server doesn't see WebComboCategory.Value.&lt;/p&gt;
&lt;p&gt;see javascript example&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;How can I solve that.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Andrzej&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</description></item></channel></rss>