Xamarin Clear many items in grid - xamarin

I have a grid but it have So many childrens ( Like 800-900 ) And when i press refresh button it must refresh all childrens like delete olds and create new ones. When i use grid.Children.Clear()
its take so long time for clear all and create new ones. How can i fix it ? when i google it they say create new grid instead of use children.clear but how can i dispose first one ? How can i refresh my datas faster when i click button ? I need help about it . Thanks for helpings!

Why do you produce children? You can use CollectionView for good performance.. also the features you want are easier for CollectionView.
I recommend it for CollectionView and its refresh structure.
https://www.youtube.com/watch?v=JY900hOQCKQ

Related

How to implement routing when I need swipeable view inside another view with Ionic Framework?

How can I implement ui-router when I make a swipeable view inside another view with Ionic Framework?
I need to make a calendar view, which will contain 3 parts:
Navigation bar (unchangeable)
Day details bar under the navigation bar it should not move while I swipe list (3) and it should display current day/date
Scrollable/Swipeable list of time slots available for selected day, this list should be swipeable back and forth to next/previous day and scrollable.
This is how I imagine myself how it should be:
Ok, I've done it much more simpler by using ion-slide-box to which I dynamically adding slides as explained here: How to insert data dynamically to ion-slide-box Angularjs Ionic.
Anyway, if somebody has another idea how can it be implemented please comment or post your answer, it's good to have few another solutions in a toolbox.

Issue with Kendo MVVM Cascading drop down

I am working on developing a cascading drop down with Kendo MVVM. The issue is that when the drop down loads the child drop down initially displays "undefined". This disappears though when I select some data in the parent drop down.
Alternatively I also require a Reset button in place. On click of this button I need to reset the cascade so that we get back to the initial phase(i.e. the child drop down should be disabled and no data should be selected in the parent).
Please find a JSBin that I created for the issue here
Thanks in advance for the help.
You should be using IDs as values, not strings. I think you can play around with data-primitive-value but why? Just use proper structure to begin with. For the clear, just dropdownlist.select(0) or dropdownlist.select("") if you managed to make it work with the primitive value thing.
http://dojo.telerik.com/ePIDO

How to know when NSTableView is done (re)loading its contents?

I have a UI that looks similar to the mail app. A table view along the left with a single column of items. When one of the those items on the left is selected, details about that item are shown on the right.
When some event occurs in my app that requires the data in the left table view to be reloaded, the current selection is lost and then the right detail view and left master view get out of sync.
The way i hoped to solve this problem was, when it was time to reload the table data, I would:
1. Save the current selected item
2. reload the table data
3. Handle a delegate method or notification that let me know when the reloading was done.
4. Re-select the proper item by finding it in the new list of items in the table.
Unfortunately I cannot find any way to determine when the table is done reloading. Is there a. any way to figure this out, or b. a more elegant solution to this problem?
thanks.
update: In case my problem was unclear, imagine you are in the mail app and you have some message selected. That summary cell is shown as selected on the left, and the details of the message are shown on the right. Suppose new mail comes in which appear as new cells at the top of the table. How is the message you are currently viewing preserved, and not de-selected?
reloadData is something of a sledgehammer. 10.7 offers a better solution.
Instead of using reloadData, when you have new rows to add, use insertRowsAtIndexes:withAnimation: . When you have rows to delete, use removeRowsAtIndexes:withAnimation: . And, of course, if an existing row has changed, there's reloadDataForRowIndexes:columnIndexes.
These should remember the selection for you (at least, the equivalents on iOS do).
If you can't target 10.7, some of the other suggestions will probably help out. noteNumberOfRowsChanged may also be helpful but I've not actually used it.
You can save selection on tableView(_:shouldSelectRow:) then select the row right after you create the cell in tableView(_:viewFor:row:) using selectRowIndexes(_:byExtendingSelection:).
It is pretty reliable no matter how / when / how many times you reload the table.

Notifying other page database item has changed, best practice for MVVM WP7.5?

First of all, I'm using MVVM for this and I would like to continue using it and ofc using the best practices as well.
I have a Mainpage which will display a list of items. On another page you can add such items. The items will be saved in a database which came with the Mango update.
When a item is added I want to navigate back to the mainpage and I want the list to be updated automatically. Is this possible and what's the best way? I'm thinking of following scenario's:
Use the Refresh query string when you navigate. Check in the back end of your main if there is a refresh. Then send a message 2 the ViewModel that he needs to update his list. I have tried this and this works. But this doesn't really sound the right way for MVVM.
Can't this be done with the NotifyPropertyChanged event that you can raise on your Database Model ? Or doesn't it work over different pages?
Reload the whole ViewModel for the main page somehow.
Any other idea's?
Use MVVM-Lights Messenger. The MainViewMode can subscribe to a Refresh event and the ViewModel where the items are added can publish a Refresh event.
This is a good example of how messenger can be used.

How to implement a Chained menu in PHP?

I want to have a AJAX Function of implementing a chained menu + a result table.
What i need to do:
Firstly, the page populate automatically a vertical menu from MySQL and a result table.
Secondly, when i click an item in the menu, it displays a submenu in a fixed area in the page and a new result table.
Thirdly, when i click an item in the submenu, it displays a sub-submenu in another fixed area in this page and a new result table.
Last, when i click an item in the sub-submenu, it displays a result table.
All the result tables are in the same position. It changes depending on the click in the menus.
I'm lost in how to do that. Do you any ideas about how to implement this? Thanks so much.
Edit:
The effect is a little like this: effect
Your First, Second, Third, Last very much looks like visualjquery.com
I believe it is written in Javascript+jQuery, so you could learn from its source.

Resources