When I insert a new match after removing one from the collection view.
It remembers the last match's state.
here if I have selected Chelsea previously it will kept the 2nd option selected for the new entry
So I have CollectionItemView custom control defined and used in the collection view item template and the collection view is binded with an observable collection from which I remove the item upon removing item CollectionItemView disappears but when I insert new item in the observable collection the state of previously removed CollectionItemView restore itself.
Bind itemsource to an observablecollection and remove from/add to that. Any changes will impact the UI.
Related
I have a list of items. First I select an item from list then save it in local db. Now I want that when user open app next time. The save item should be default selected in the list. But no item is selecting default when user comes next time.
How is it possible in xamarin.forms to select an item default selected in listview?
You can set the Listview Selected Item in your code behind.
Assuming you have Binded your ItemsSource, you just need to get the object you want to set as selected and do this:
ListviewItems.SelectedItem = YourCollection[YourIndex];
I have a form that has a menu item which takes us to another form and per base AX filters on the selected record.
I want to create a separate menu item that takes me to the same form, but instead removes the filter on the record.
Any ideas?
Are you talking about Dynalinks, Opening a second form from the first, and only seeing the records in the second that relate to the currently selected record in the first.
If so Either remove the Datasource property from your new menu item on the first form, or programmaticly clear the dynalink in the second forms datasource's Init() method
Here is a simple example (from AX2009)
http://ckmun.wordpress.com/2009/07/08/cleardynalinks-method/
I have a viewstack with two tabs.
In one of them there is a data grid shows a list of notes. The other one is includes a form that can edit notes or crates new note. I want the user to be able to add new note or edit existing note when clicks an item in data grid. I mean when user clicks an item the viewstack must become editor.
You can use the "selectedIndex" or "selectedItem" property on the viewstack to switch the active view. In your case, an event should be dispatched that bubbles up to the component containing the viewstack. When it arrives, the viewstack's active view can then be changed.
To be more descriptive here's a live example:
http://interklub.biz/CTPonLine.html
In last column there's a ComboBox with some values.
When user choose an option in ComboBox from first row and then scroll down the first choice disapears (comes back to default state).
There's something more strange, earlier I've tried to apply a one more ComboBox in additional column, with highly dynamic values (completly different for different rows), but with after same action (scroll down and then scroll down) values dataProviders from different ComboBox were switch.
It looks like you're not initializing your item renderer properly--when the renderer is reused, it's keeping its old value rather than updating from your data.
You should be able to resolve this by doing one of the following:
binding the item renderer's selectedValue to some property of its data element
overriding set data() to update the control for the current data
acting on the dataChange event and updating there
See Adobe's Working with Item Renderers for more.
I have a flex datagrid in a popupwindow.That datagrid should be empty means there is no dataprovider.User will provide data.For that purpose I have to make datagrid columns editable.I tried with editable property.It is not working.And also one more requirment is whenever user completed entering of first row data,next row has to be displayed with empty cells.Can anyone help me.
The datagrid should be displayed with editable empty fields.
You need to set a dataprovider for the datagrid. You need an ArrayCollection that holds all the (newly added) entries from the user plus an empty entry. When you initialize the dataprovider it has to contain the empty entry, otherwise there will not be the possibility to "add" a new entry via the grid because the grid only allows to edit the existing entries. So after the user begins to fill the empty entry, you have to add a new, empty entry to the dataprovider.