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 use a webcombo in webgrid called "wc_ship_warehouse".
<ISWebCombo:WebCombo ID="wc_ship_warehouse" runat="server" DropDownRows="30" ScriptDirectory="../CommonLibrary/WebCombo/V6_0_7200/" SharedScriptDirectory="../CommonLibrary/Shared/" Height="30px" Width="120px" DataValueField="f_id" DataTextField="f_name" UseDefaultStyle="True" AllowAutoDataCaching="False" OnInitializeDataSource="wc_ship_warehouse_InitializeDataSource"> <Columns> <ISWebCombo:WebComboColumn BaseFieldName="f_name" HeaderText="船舶仓库名称" Name="f_name" Width="120px" /> <ISWebCombo:WebComboColumn BaseFieldName="f_code" HeaderText="仓库位置编号" Name="f_code" Width="100px" /> <ISWebCombo:WebComboColumn BaseFieldName="f_ship_id" Name="f_ship_id" Hidden="true" RenderOnHidden="true" /> </Columns> <LinkSettings Enabled="true" ParentWebComboID="wc_user_ship" FilterDataMember="f_ship_id" /> <LayoutSettings ResultBoxHeight="200" HelpURL="../Help/h_webcombo.html" ScriptDirectory="../CommonLibrary/WebCombo/V6_0_7200/" ImagesDirectory="../CommonLibrary/Images/" EnableAnimation="True" ComboMode="MultipleColumns" EntryMode="AutoComplete" EnableSlidingAnimation="True" ResultBoxWindowType="Normal"> </LayoutSettings> </ISWebCombo:WebCombo>
I set its linksettings like this <LinkSettings Enabled="true" ParentWebComboID="wc_user_ship" FilterDataMember="f_ship_id" /> the parentWebComID "wc_user_ship" is an independent control not in this webgrid. Both these webcombos datasource is right.But When I edit the webcombo value in this webgrid,It calls an error like this:The ParentWebcombo "wc_user_ship" which this webcombo is linked to does not bound any column in this webgrid" So Please how can I solve this problem?
Thank you for the question.I apologize for any inconvenience this problem may have caused you.I can reproduce the error message on my end as well.I create a work around sample to resolve this issue that perhaps similar with your current scenario.First, let me explain a little about the sample.In this sample I add one WebGrid & two WebCombo. I bind those controls to access data source control (Northwind data base).The WebGrid was bound to Order Details table; the first WebCombo (CategoriesWebCombo) bind to Categories table; the second WebCombo (ProductsWebCombo) bind to Products table.In ProductID WebGrid’s column, I set the “EditType” to “WebComboNET” and “WebComboID” to “ProductsWebCombo”.In CategoriesWebCombo, I add OnAfterItemSelected client side event:
function CategoriesWebCombo_OnAfterItemSelected(controlId){ var ProductsWebCombo = ISGetObject("ProductsWebCombo"); //clears the data list in ProductsWebCombo ProductsWebCombo.NeedClearList = true; ProductsWebCombo.IsDirty = true; return true; }
In ProductsWebCombo, I set the Set “AllowAutoQueryHandler” property to “False”. Then I add “OnBeforeRequestclient” side event:
function ProductsWebCombo_OnBeforeRequest(controlId, action) { var CategoriesWebCombo = ISGetObject("CategoriesWebCombo"); if(action == "LoadData") { if (CategoriesWebCombo.Value == "" || CategoriesWebCombo.Value == null) { alert("Please select a value for the following webcombo input : " + CategoriesWebCombo.Name); return false; } } return true; }
And I add “OnInitializeDataSource” server side event:
protected void ProductsWebCombo_InitializeDataSource(object sender, ISNet.WebUI.WebCombo.DataSourceEventArgs e) { OleDbConnection oConn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Northwind.mdb;Persist Security Info=True"); oConn.Open(); string queryText = ""; DataTable dt = new DataTable("Products"); if(CategoriesWebCombo.Value != "" && CategoriesWebCombo.Value != null) { queryText = "CategoryID = " + CategoriesWebCombo.Value; OleDbDataAdapter da = new OleDbDataAdapter("Select * From Products Where " + queryText, oConn); da.FillSchema(dt,SchemaType.Mapped); da.Fill(dt); e.DataSource = dt; } ProductsWebCombo.DataMember = "Products"; ProductsWebCombo.DataTextField = "ProductName"; ProductsWebCombo.DataValueField = "ProductID"; }
With this work around, the ProductsWebCombo will show data based on the selected item in CategoriesWebCombo.Please kindly try to select an item in CategoriesWebCombo, and then try focus on ProductID WebGrid’s column on Add New Row section.Hope this helps.Regards,Hans K.
Thank you for your help.I take your advice and solve the problem.Thank you.
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