Error caused by WCF Publisher for my subscriber application - winforms

I am developing a Windows Form Application as a subscriber for my WCF Publish Subscribe Service. The windows form application would have a combo box that acts as a filter for 2 types of fruits, Apple and Orange.
Mainly 3 choices would be given in the combo box.
All Fruits
Apple
Orange
The fruits are all displayed in a Flow Layout panel that contains individual panels for each individual fruits. Hence when clicking all fruits, the flowlayoutpanel will create a flowlayoutpanel that contains every single panels of all fruits. (e.g. 4 fruits = 4 panels)
when the publisher publish a new type of food to the application, my filter for my combo box does not works anymore. (clicking the difference choices in the combo box does not filter the panels anymore) During publishing, i simply repopulate the list of fruits through a populateList() method and by using the following code
flowLayoutForFruit = createFlowLayoutPanel(1);
this.Controls.Add(flowLayoutForAlert);
As for the method ,createFlowLayoutPanel(integer type), it has basically 3 types of it.
1 - Both Types of Fruits
2 - Apple
3 - Orange
Since I am publishing a new post, I would just set the default view as all types of fruits, hence for the creation of type 1. Did the publishing of the new post screw up the event handler of the combo box or something?

All it takes was just adding a line of code to dispose the panels before adding it again.

Related

How to append a datasource in Google App Maker in realtime and on clientside?

I have an Accordion widget that is connected to a datasource 'Projects'. I have a list of all the projects and their details. However, each record in the projects datasource has a string field called "Project Type" which can contain one type or several types (seperated by commas), for e.g "Field,Qual,Quant" etc.
The challenge I am facing is that I want to create another accordion that contains rows depending on the number of types of project. For example if ProjectID P23 has project type as "Field,Qual,Quant", then when I click on the accordion for Project P23 it must expand further accordion widgets based on the number of projects types, in this case, 3 more rows should be visible.
What I am thinking is that whenever I click on a Project row, it should create a datasource with 3 records depending on the number of project types. Then I can bind this data source to the subsequent accordion. However, the problem with that this will become a server-side call and cannot work synchronously. I want to do this on an onClick event of the first accordion so that results should be instant. And whenever the accordion closes, the datasource should get empty, so for any other project, it should be a dynamic process.
Any leads would be greatly appreciated.
P.S. I know App Maker is getting decommissioned.

ExtJS: How to group items in combo box, but then show all detail records in display text

Using ExtJS 6.x. I have the following Fiddle:
bind grouped combo box value to detail displayfield
To start with: I would like to show just a single instance of each item in the combo box instead of the multiple instances that show up for each item (thus, instead of "one" and "two" showing up multiple times, I only want these to appear once in the combo box). Is there a way to do the grouping within the viewModel to achieve this?
Assuming then that the combobox items are now grouped accordingly, I then want to show the details in the displayText area, so that for example, if I choose "one" from the combo box, the detail area would show ALL the ids associated with this, those being '1' and '2'.
I solved this, although it feels a bit kludgey:
First, I created an SQL view with the records grouped together (using a unique key of "name + code")... then, I created another SQL view where "name + code" was another field for the original table.
I then used associations in my models to link these two entities together, and thus, used data bindings to link the record selected in the combobox to a grid.

Binding a dictionary to tabs control with list box inside in wpf

I need to create tab control when on each tab there is a list box with related items.
e.g:
What would be the best way to build it dynamically?
TX
As per my understanding. You can put 3 category for tab headers and add the each list box items as sub category. query the collection for related of tab headers.
EX:
Category :
1. Food
2. Book
3. Car
Sub Category:
1(Food):
1. Egg
2. Meat
3. Milk
etc..........

MS Access: Accessing data from multiple tables in a tabbed form

I have an inventory system in MS Access 2010, and am trying to make a form that accesses multiple tables. Here is the relevant part of the data relationships printout:
I have a tabbed form that I am using that, for each food item, allows our orderers to edit/view the food purchasing data for that food item, or edit/view the inventory data for that food item. This is what that looks like:
So, currently, the parent form is using [Food items] as the control source. I want the tabs to basically display (and update when edited) the appropriate data from the [Inventory] and [Food purchase data] tables for that food item. So for instance, in the example above, the Food purchase data tab should be searching for the record for Agave in the [Food purchase data] table, and using that to populate the fields for that tab (and likewise for the inventory tab).
What is the best way to go about this?
Simply, use subforms inside your tabs, maintaining Food Items as the main form's recordsource. Remember, forms are essentially visual representations of tables. So on the main form, build separate forms for Inventory and Food Purchases and then link them just as you do in relationships.
How to specifically integrate subforms on main form?
Build subforms as separate regular forms, either as single, multiple-item, or datasheet. Don't place anything in page header/footer as they will not show on main form. You can use form header/footer.
Then in design view of Food Items main form, go to the tab control and select tab area, making sure yellow outlines appears, then locate the subform/subreport control in menu in Design tab on ribbon (looks like a newspaper icon if you scroll towards the end). Select the form specific to tab.
Walk through wizard, setting up the parent/child linked ids which you can also do on each subform control's Data tab in Property Sheet. Now, form will appear in its own design view where you can stretch out, re-position, and manage its own controls accordingly.

Does anyone know of a good load-on-demand combobox for WPF?

I have been searching for a while now, and have not been able to find a load-on-demand combo box that populates itself depending on what is typed in the combo-box.
I also have a requirement that an item in the list must be selected (i.e.: free text can be entered but not "selected" - only a "search result" can be selected from the list in the combo box.
The scenario is as follows : there is a text box/combo box where someone enter the first 2 or 3 characters, a web service is called which queries a database and then populates the combo box.
Are there any controls or code example that anyone knows of? Or alternatively another way to implement this?
Here is a link to an asp.net control that has this functionality:
http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx
use the event "textchanged" to dynamicly add/remove items :)
updated :
why not bind the results to observable collection and databind that to the combo box , so on chnage > query database > bind items to the collection , .net automatilcy updates the items , this might work :)
Telerik combobox with autocomplete will be what you are looking for.

Resources