I have two detailslist and I want to drag items from one to another, the problem is the second DetailsList is empty when component initialized and it doesn't accept drag and drop operations, but as soon as I add an item to the list it start getting dropped items.
Related
I have an application in which on the first activity I create an Item in the recyclerView (a section consisting of one or two words), and by clicking on it I go to another activity where the RecyclerView is also located in which I create ordinary notes by filling out the adapter. The problem is that for each Item I need a separate recyclerView, and wherever I clicked, the same recyclerView opensenter image description here
enter image description here
It's the basic data problem I think.
Maybe You're not passing the right data when an item is clicked. Try putting some logs or debug points where you pass the data in the next activity to set it in the recyclerview.
I want a menu (hidden on the left side of my app) with a variable amount of buttons (depending on the user). I took the app over from another developer and he manually added every view and every button and it is a pain to maintain if you want to add another button in between or change something. So I want to redo it automatically.
But how can I achieve that? Let's say i have on the left x views, each containing an image, a button and a separator (to the button below). So I basically only create one single prototype view, button combo and reuse it for all other buttons. But how do I arrange them so the constraints are correctly set?
I would go with a table-view. Setup a cell with an image and a button, separators come for free in a table-view. Make sure the cell has a delegate for the button call-back or a closure to handle the button tap.
Add a controller/manager to control the number of views based on the user.
I have a list of things that I show in a list view with sections. I can add a new item by going to 'Add new item' screen. After the item is saved, I pop one screen and the user lands on the list view again. On this view, I see an empty in some cases as shown below.
One case where I always see an empty row is when I don't have any items in the Recent section and then I add an item which falls in Recent section. In this case, I always see an empty row on the Past Section as shown in the image.
The empty row disappears as soon as I scroll or do anything on the screen. I tried to use RecyclerViewBackedScrollView as the scroll component for the list view which solves this problem but that component is riddled with many other bugs and my app crashes a lot while using it.
I don't this caused by any incorrect code within my app. Below is how I create the ListView
<ListView
dataSource={tempDataSource}
renderRow={this.renderRow}
renderSectionHeader={this.renderSectionHeader}
renderSeparator={this.renderSeparator}
style={styles.componentListViewContainer}
initialSize={10}
pageSize={10}
/>
I have confirmed that the dataSource doesn't contain any empty entry in there. renderRow renders the row, renderSeparator renders the horizontal lines, renderSectionHeader renders the Recent and the Past section headers.
I am using react-native 0.37.2 at the moment.
Please share if you have any information on how to fix this problem.
I have a scrollviewer in page which shows data vertically, and it contains controls like grid, stackpanel and listbox.
Listbox contains items with expanderview. On click of expander view header it expands, I just want that whenever it expands its content get visible in page. Means i have to automatically change scroll position and make visible a Listbox selected control.
Is there any way?
There is a way to manage it Programatically with use of Timer. When the timer is triggerd, we call the timer_Tick event handler, which scrolls to the current index and marks it as selected, and then updates the index. After the last item is highlighted the index is reset to the first item. You can find useful sample here Auto-scrolling ListBox for Windows Phone
You need to calculate the offset where you want to scroll to, and then use ScrollToVerticalOffset(your_offset_value) method.
Have a look over here : How to use ScrollViewer.ScrollToVerticalOffset?
I have two list views in a scene (listview1 and listview2, contents of listview2 depends on the selecteditem on listview1) and when I navigate to the scene I want the first item in listview1 to be selected and the details be displayed in the other listview (listview2) but I do not want any item in the listView2 selected by default.
What i am observing is that the first item in listView2 is also selected and that is causing selectionchanged event to be triggered for listview2 (which I want to be triggered only if the user explicitly selects it)
No need for workarounds.
Just set IsSynchronizedWithCurrentItem="False" in your ListView.
This also works for GridViews.
selectionchanged events will be triggered and cannot be stopped. But it can be bypassed (using a flag) in the code behind.
If ListView is bound to CollectionViewSource, CollectionViewSource sets the first items as selected.
If ListView is bound to regular Collection, no items will be selected automatically.
This is because you set the event handler of list view 1 & 2 by XAML, maybe.
If you set the data source and selected item first, then,
set the event handler by your code behind, it works well, I think.