The question was asked in the office if it possible to use the TileView control for DataEntry? More So Editing Data that has alread been entered
is this possible?
I assume it is based on the idea of putting a save button in the Data Template and wiring up the event in the XAML. the real question would be can you get to the data objects bound to the TIleView? the other question i was wondering is since all of the controls are in the the DataTemplate how hard is it to write something such as a group of 3 cascading dropdowns?
the current tileView i am playing around with is bound to a colletion which holds a header/ details set up. is it going to be possible to add data to the child collection (details) from inside the tile pane?
Hi spicish22, you can access data objects from DataTemplate.For example, if you have a class User and TileView is bound to some collection of users and there is button btnEdit in the DataTemplate you can acsess User object in Click eventhandler:private void btnEdit_Click(object sender, RoutedEventArgs e){User user = ((Button)(sender)).DataContext as User;user.Name = "NewName";}Regards,Marin
Thanks
any insite on the cascading dropdowns??
i also need to do editing with the xamlwebgrid in there but i assume that should work?
Hi,I'm not sure what is your idea about 'cascading dropdowns' but it is possible to modify items in TileView from DataTemplate; you can add or remove items; You can add a Button to delete some child:private void btnDelete_Click(object sender, RoutedEventArgs e){User user = ((Button)(sender)).DataContext as User;ObservableCollection<User> source = tileView1.ItemsSource as ObservableCollection<User>;source.Remove(user);}Regards,Marin
Yes, it is possible. I don't see any problems. Is there something specific in your application?Regards,Marin
i guess an example would be if you have 2 comboboxs in the datatemplate such as state and city, is it possible to load the values of city when state is selected