Search Results

Search found 35 results on 2 pages for 'dataform'.

Page 1/2 | 1 2  | Next Page >

  • Dataform fields won't appear

    - by dsetton
    Hello! I am trying to learn how to use the Silverlight 3 DataForm control, because I need to define the DataForm fields myself in the XAML code, that is, I don't want to use the AutoGenerateFields property. My problem is: the dataform works perfectly when the AutoGenerateFields is set to true, but when I create a DataForm and set the fields manually and run the application, all I get is an empty blank rectangle where my form and its fields should be. I created a blank Silverligh Navigation Application to test this, and below is the code of the Home.xaml page: <Grid x:Name="LayoutRoot"> <StackPanel> <!-- This doesn't work. It renders a blank rectangle --> <dataFormToolkit:DataForm x:Name="DataForm"> <dataFormToolkit:DataForm.EditTemplate> <DataTemplate> <StackPanel dataFormToolkit:DataField.IsFieldGroup="True"> <dataFormToolkit:DataField> <TextBox Text="Test1" /> </dataFormToolkit:DataField> <dataFormToolkit:DataField> <TextBox Text="Test2" /> </dataFormToolkit:DataField> <dataFormToolkit:DataField> <TextBox Text="Test3" /> </dataFormToolkit:DataField> </StackPanel> </DataTemplate> </dataFormToolkit:DataForm.EditTemplate> </dataFormToolkit:DataForm> <!-- This works. --> <dataFormToolkit:DataForm x:Name="DataForm2"/> </StackPanel> </Grid> To make the second DataForm work, I simply created a Person class, and put the following in Home.xaml.cs: protected override void OnNavigatedTo(NavigationEventArgs e) { Person client = new Person { Age = 10, DateOfBirth = new DateTime(1980, 10, 20), FirstName = "John", LastName = "Doe" }; DataForm2.CurrentItem = client; } You can see what happens when I run the application in the following link: http://dl.dropbox.com/u/1946004/image.PNG (I don't have enough points to post images, so...) Does anyone know what's wrong? Thank you in advance.

    Read the article

  • Silverlight DataForm Memory Leak

    - by Andrew Garrison
    Some Background I have noticed that setting the EditTemplate of a DataForm (from the Silverlight Toolkit) can cause the DataForm to not be garbage collected. Consequently, the parent control of the DataForm cannot be garbage collected either, causing a very significant memory leak. Here's some XAML which demonstrates the case. <toolkit:DataForm HorizontalAlignment="Stretch" Margin="10" VerticalAlignment="Stretch"> <toolkit:DataForm.EditTemplate> <DataTemplate> <toolkit:DataField Label="Dummy Binding:"> <TextBox Text="{Binding DummyBinding, Mode=TwoWay}" /> </toolkit:DataField> </DataTemplate> </toolkit:DataForm.EditTemplate> </toolkit:DataForm> I have opened an issue on CodePlex. The isssue has an attachment which has a project which desmonstrates the case. So, My Question Is Has anyone else encountered this issue? More importantly, does anyone know of any workarounds? How can I force this DataForm to be garbage collected?

    Read the article

  • Date formatting using data annotations for a dataform in Silverlight

    - by Aim Kai
    This is probably got a simple answer to it, but I am having problems just formatting the date for a dataform field.. <df:DataForm x:Name="Form1" ItemsSource="{Binding Mode=OneWay}" AutoGenerateFields="True" AutoEdit="True" AutoCommit="False" CommitButtonContent="Save" CancelButtonContent="Cancel" CommandButtonsVisibility="Commit" LabelPosition="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled" EditEnded="NoteForm_EditEnded"> <df:DataForm.EditTemplate> <DataTemplate> <StackPanel> <df:DataField> <TextBox Text="{Binding Title, Mode=TwoWay}"/> </df:DataField> <df:DataField> <TextBox Text="{Binding Description, Mode=TwoWay}" AcceptsReturn="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Height="" TextWrapping="Wrap" SizeChanged="TextBox_SizeChanged"/> </df:DataField> <df:DataField> <TextBlock Text="{Binding Username}"/> </df:DataField> <df:DataField> <TextBlock Text="{Binding DateCreated}"/> </df:DataField> </StackPanel> </DataTemplate> </df:DataForm.EditTemplate> </df:DataForm> I have bound this to a note class which has the annotation for field DateCreated: /// <summary> /// Gets or sets the date created of the noteannotation /// </summary> [Display(Name="Date Created")] [Editable(false)] [DisplayFormat(DataFormatString = "{0:u}", ApplyFormatInEditMode = true)] public DateTime DateCreated { get; set; } Whatever I set the dataformatstring it comes back as: eg 4/6/2010 10:02:15 AM I want this formatted as yyyy-MM-dd HH:mm:ss I have tried the custom format above {0:yyyy-MM-dd hh:mm:ss} but it remains the same output. The same happens for {0:u} or {0:s}. Any help would be gratefully received. :)

    Read the article

  • Synchronize DataGrid and DataForm in Silverlight 3

    - by SpiralGray
    I've been banging my head against the wall for a couple of days on this and it's time to ask for help. I've got a DataGrid and DataForm on the same UserControl. I'm using an MVVM approach so there is a single ViewModel for the UserControl. That ViewModel has a couple of properties that are relevant to this discussion: public ObservableCollection<VehicleViewModel> Vehicles { get; private set; } public VehicleViewModel SelectedVehicle { get { return selectedVehicle; } private set { selectedVehicle = value; OnPropertyChanged( "SelectedVehicle" ); } } In the XAML I've got the DataGrid and DataForm defined as follows: <data:DataGrid SelectionMode="Single" ItemsSource="{Binding Vehicles}" SelectedItem="{Binding SelectedVehicle, Mode=TwoWay}" AutoGenerateColumns="False" IsReadOnly="True"> <dataFormToolkit:DataForm CurrentItem="{Binding SelectedVehicle}" /> So as the SelectedItem changes on the DataGrid it should push that change back to the ViewModel and when the ViewModel raises the OnPropertyChanged the DataForm should refresh itself with the information for the newly-selected VehicleViewModel. However, the setter for SelectedVehicle is never being called and in the Output window of VS I'm seeing the following error: System.Windows.Data Error: ConvertBack cannot convert value 'xxxx.ViewModel.VehicleViewModel' (type 'xxxx.ViewModel.VehicleViewModel'). BindingExpression: Path='SelectedVehicle' DataItem='xxxx.ViewModel.MainViewModel' (HashCode=31664161); target element is 'System.Windows.Controls.DataGrid' (Name=''); target property is 'SelectedItem' (type 'System.Object').. System.MethodAccessException: xxxx.ViewModel.MainViewModel.set_SelectedVehicle(xxxx.ViewModel.VehicleViewModel) It sounds like it's having a problem converting from a VehicleViewModel to an object (or back again), but I'm confused as to why that would be (or even if I'm on the right track with that assumption). Each row/item in the DataGrid should be a VehicleViewModel (because the ItemsSource is bound to an ObservableCollection of that type), so when the SelectedItem changes it should be dealing with an instance of VehicleViewModel. Any insight would be appreciated.

    Read the article

  • Silverlight Dataform validation doesn't work

    - by VexXtreme
    Hi I can't get dataform and it's controls to catch exceptions when validating. Fir instance, I have: <PasswordBox Password="{Binding Password,Mode=TwoWay,NotifyOnValidationError=true,ValidatesOnExceptions=true}" /> All required properties are set to true. In the setter of my Password property I throw a ValidationException upon failed validation, but the data form doesn't catch it, it just causes the application to crash as if it were a normal exception. Am I doing something wrong? Thanks

    Read the article

  • How can I set initial values when using Silverlight DataForm and .Net RIA Services DomainDataSource?

    - by TheDuke
    I'm experimenting with .Net RIA and Silverlight, I have a few of related entities; Client, Project and Job, a Client has many Projects, and a Project has many Jobs. In the Silverlight app, I'm uisng a DomainDataSource, and DataForm controls to perform the CRUD operations. When a Client is selected a list of projects appears, at which point the user can add a new project for that client. I'd like to be able to fill in the value for client automatically, but there doesn't seem to be any way to do that, while there is an AddingNewItem event on the DataForm control, it seems to fire before the DataForm has an instance of the new object and I'm not sure trawling through the ChangeSet from the DomainDataSource SubmittingChanges event is the best way to do this. I would of thought this would of been an obvious feature... anyone know the best way to achieve this functionality?

    Read the article

  • How do I change the spacing between fields in a DataForm?

    - by Simon_Weaver
    How do I change the spacing between fields in a DataForm in Silverlight? I've tried editing the template but cannot find what I need. I thought all I needed to do was change the MinHeight and Margin of the DataField style, but that doesn't seem to do it. <Style TargetType="dataFormToolkit:DataField"> <Setter Property="IsTabStop" Value="False"/> <Setter Property="Margin" Value="2"/> <Setter Property="MinHeight" Value="5"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="dataFormToolkit:DataField"> <ContentControl x:Name="ContentControl" Foreground="{TemplateBinding Foreground}" HorizontalContentAlignment="Stretch" IsTabStop="False" VerticalAlignment="Center"/> </ControlTemplate> </Setter.Value> </Setter> </Style> I've found a number of articles about styling DataForm but many of them seem to be out of date. I don't see anything in the complete extracted template in Blend that corresponds to spacing.

    Read the article

  • Silverlight 4 Overriding the DataForm Autogenerate to insert Combo Boxes bound to Converters.

    - by kmacmahon
    I've been working towards a solution for some time and could use a little help. I know I've seen an example of this before, but tonight I cannot find anything close to what I need. I have a service that provides me all my DropDownLists, either from Cache or from the DomainService. They are presented as IEnumerable, and are requested from the a repository with GetLookup(LookupId). I have created a custom attribute that I have decorated my MetaDataClass that looks something like this: [Lookup(Lookup.Products)] public Guid ProductId I have created a custom Data Form that is set to AutoGenerateFields and I am intercepting the autogenerate fields. I am checking for my CustomAttribute and that works. Given this code in my CustomDataForm (standard comments removed for brevity), what is the next step to override the field generation and place a bound combobox in its place? public class CustomDataForm : DataForm { private Dictionary<string, DataField> fields = new Dictionary<string, DataField>(); public Dictionary<string, DataField> Fields { get { return this.fields; } } protected override void OnAutoGeneratingField(DataFormAutoGeneratingFieldEventArgs e) { PropertyInfo propertyInfo = this.CurrentItem.GetType().GetProperty(e.PropertyName); foreach (Attribute attribute in propertyInfo.GetCustomAttributes(true)) { LookupFieldAttribute lookupFieldAttribute = attribute as LookupFieldAttribute; if (lookupFieldAttribute != null) { // Create a combo box. // Bind it to my Lookup IEnumerable // Set the selected item to my Field's Value // Set the binding two way } } this.fields[e.PropertyName] = e.Field; base.OnAutoGeneratingField(e); } } Any cited working examples for SL4/VS2010 would be appreciated. Thanks

    Read the article

  • ComboBox Binding inside Dataform Silverlight

    - by Sergio
    Hi, well I have my users table and my department table, so I have in XAML a Datagrid and a Dataform, in my dataform i have a combobox that is filled from the department table (all possible departments), I bind it to the Department attribute from my user, and it shows it. The problem is that when I click the edit button of the dataform the combobox goes blank... if i cancel the edit it goes back to the department of the user. Another thing is if i edit the user and choose a department when i commit the edit it works and when i edit that same user the combobox doesnt go blank now ... but for the other users it does if i havent specifically choosen the department in the combobox.

    Read the article

  • DataForm Control like in SL3 for WPF

    - by TS
    Hi Im looking for a control like the DataForm which is new in Silverlight 3 for handling the whole binding and validation logic (declarativly with property attributes etc) for WPF. I always thout of SL as a subset of WPF but there seems to bee no DataForm control, at least not in the System.Windows.Controls namespace like in SL (I know SL uses another CLR) Have i overlooked something? Thanks for help! ts

    Read the article

  • Missing Edit Option on Silverlight 4 DataForm

    - by rip
    I’m trying out the Silverlight 4 beta DataForm control. I don’t seem to be able to get the edit and paging options at the top of the control like I’ve seen in Silverlight 3 examples. Has something changed or am I doing something wrong? Here’s my code: <UserControl x:Class="SilverlightApplication7.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" xmlns:dataFormToolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.DataForm.Toolkit"> <Grid x:Name="LayoutRoot" Background="White"> <dataFormToolkit:DataForm HorizontalAlignment="Left" Margin="10" Name="myDataForm" VerticalAlignment="Top" /> </Grid> </UserControl> public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); this.Loaded += new RoutedEventHandler(MainPage_Loaded); } void MainPage_Loaded(object sender, RoutedEventArgs e) { Movie movie = new Movie(); myDataForm.CurrentItem = movie; } public enum Genres { Comedy, Fantasy, Drama, Thriller } public class Movie { public int MovieID { get; set; } public string Name { get; set; } public int Year { get; set; } public DateTime AddedOn { get; set; } public string Producer { get; set; } public Genres Genre { get; set; } } }

    Read the article

  • How to tell which dataform button ended edit when using EventToCommand

    - by Rodd
    I'm new to SilverLight and Mvvm-Light. I have a DataForm on my view that displays/edits a SelectedPerson property (a Person object) of my view model. I want to execute a command on my viewmodel when the user clicks the Save button but don't want to take action if the user clicks cancel. I added the following to my ViewModel: public RelayCommand PersonEditEnded {get; set;} ... public void Initialize() { PersonEditEnded = new RelayCommand(DoSomething); ... } public void DoSomething() { } I added the following to my View: <toolkit:DataForm x:Name="PersonForm" ... CurrentItem="{Binding SelectedPerson, Mode=TwoWay}"> <i:Interaction.Triggers> <i:EventTrigger EventName="EditEnded"> <gs:EventToCommand Command="{Binding PersonEditEnded, Mode=OneWay}"/> </i:EventTrigger> </i:Interaction.Triggers> </toolkit:DataForm> This works and the DoSomething method is being called when the user presses Submit. However, DoSomething is also called when user presses Cancel. Is there a way to know which button was pressed or to supress the call when Cancel is pressed? Thanks for whatever help you can offer!

    Read the article

  • Changing or accessing a control in a Silverlight Data Form Edit Template

    - by Aim Kai
    I came across an interesting issue today when playing around with the Silverlight Data Form control. I wanted to change the visibility of a particular control inside the bound edit template.. see xaml below. <df:DataForm x:Name="NoteFormEdit" ItemsSource="{Binding Mode=OneWay}" AutoGenerateFields="True" AutoEdit="True" AutoCommit="False" CommitButtonContent="Save" CancelButtonContent="Cancel" CommandButtonsVisibility="Commit" LabelPosition="Top" ScrollViewer.VerticalScrollBarVisibility="Disabled" EditEnded="NoteForm_EditEnded"> <df:DataForm.EditTemplate> <DataTemplate> <StackPanel> <df:DataField> <TextBox Text="{Binding Title, Mode=TwoWay}"/> </df:DataField> <df:DataField> <TextBox Text="{Binding Description, Mode=TwoWay}" AcceptsReturn="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Height="" TextWrapping="Wrap" SizeChanged="TextBox_SizeChanged"/> </df:DataField> <df:DataField> <TextBlock Text="{Binding Username}" x:Name="tbUsername"/> </df:DataField> <df:DataField> <TextBlock Text="{Binding DateCreated, Converter={StaticResource DateConverter}}" x:Name="tbDateCreated"/> </df:DataField> </StackPanel> </DataTemplate> </df:DataForm.EditTemplate> </df:DataForm> I wanted to depending on how the container of this data form was accessed to disable or hide the last two data fields. I did a work around which had two data forms but this is a bit excessive! Does anyone know how to access these controls inside the edit template?

    Read the article

  • Bind a list to silverlight datagrid/datafrom columns

    - by nilarya
    There must be something I am missing, I want to do a very simple thing, for example, I have a class like the following: public class Person { public int ID { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public DateTime DateOfBirth { get; set; } public List<string> phoneNumbers { get; set; } } I want to bind it to a dataform by something like this: public Person person { get; set; } List<string> lst = new List<string>(); lst.Add("123445"); lst.Add("2345345"); lst.Add("4576345"); lst.Add("456784"); lst.Add("789067"); person = new Person() { ID = 1, FirstName = "Kevin", LastName = "Dockx", DateOfBirth = new DateTime(1981, 5, 5), Lookup = lst }; and then dataForm1.CurrentItem = person; What I am doing wrong?

    Read the article

  • DataForm commit button is not enabled when data changed.

    - by Grayson Mitchell
    This is a weird problem. I am using a dataform, and when I edit the data the save button is enabled, but the cancel button is not. After looking around a bit I have found that I have to implement the IEditableObject in order to cancel an edit. Great I did that (and it all works), but now the commit button (Save) is grayed out, lol. Anyone have any idea's why the commit button will not activate any more? Xaml <df:DataForm x:Name="_dataForm" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="All"> <df:DataForm.EditTemplate > <DataTemplate> <StackPanel Name="rootPanel" Orientation="Vertical" df:DataField.IsFieldGroup="True"> <!-- No fields here. They will be added at run-time. --> </StackPanel> </DataTemplate> </df:DataForm.EditTemplate> </df:DataForm> binding DataContext = this; _dataForm.ItemsSource = _rows; ... TextBox textBox = new TextBox(); Binding binding = new Binding(); binding.Path = new PropertyPath("Data"); binding.Mode = BindingMode.TwoWay; binding.Converter = new RowIndexConverter(); binding.ConverterParameter = col.Value.Label; textBox.SetBinding(TextBox.TextProperty, binding); dataField.Content = textBox; // add DataField to layout container rootPanel.Children.Add(dataField); Data Class definition public class Row : INotifyPropertyChanged , IEditableObject { public void BeginEdit() { foreach (var item in _data) { _cache.Add(item.Key, item.Value); } } public void CancelEdit() { _data.Clear(); foreach (var item in _cache) { _data.Add(item.Key, item.Value); } _cache.Clear(); } public void EndEdit() { _cache.Clear(); } private Dictionary<string, object> _cache = new Dictionary<string, object>(); private Dictionary<string, object> _data = new Dictionary<string, object>(); public object this[string index] { get { return _data[index]; } set { _data[index] = value; OnPropertyChanged("Data"); } } public object Data { get { return this; } set { PropertyValueChange setter = value as PropertyValueChange; _data[setter.PropertyName] = setter.Value; } } public event PropertyChangedEventHandler PropertyChanged; protected void OnPropertyChanged(string property) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(property)); } } }

    Read the article

  • How can I stop Silverlight DataForm immediately saving changes back to underlying object?

    - by Simon_Weaver
    I have a Silverlight master-details DataForm where the DataForm represents a street address. When I edit the Address1 textbox, the value gets automatically committed to the bound Address object once focus leaves the textbox. If I hit the Cancel button, then any changes are undone because Address implements IEditableObject and saves its state. The problem is that since any change is immediately propagated to the underlying object it will be shown in the master grid before the user has actually hit Save. I also have other locations where this data is shown. This is not a very good user experience. I've tried OneWay binding but then I can't commit back without manually copying all the fields over. The only thing I can think of doing is to create a copy of the data first or using OneWay binding, but they both seem a little clumsy. Does DataForm support this way of working?

    Read the article

  • Passing object to the constuctor of Entity Class with adding new item from DataForm!

    - by Muhammad Jamal Shaikh
    hi, here is my case , i want to assign roles to my employees. All Roles are need to be sent to the constructor of the employee class when a user clicks + sign on the top of dataform(Silverlight toolkit 2009). if i put a break point on the default constructor , it gets hit. so i just want the dataform to send this collection when ever it creates new employee. thanks Jamal.

    Read the article

  • View bound to paged collection view not updating all of the time.

    - by Thomas
    I new to silverlight and trying to make a business application using the mvvm pattern and ria services. I have a view model class that contains a PagedCollectoinView and it is set to the item source of a datagrid. When I update the PagedCollectionView the datagrid is only updated the first time then after that subsequent changes to the data to not reflect in the view until after another edit. Things seem to be delayed one edit. Below is a summarized example of my xaml and code behind. This is the code for my view model public class CustomerContactLinks : INotifyPropertyChanged { private ObservableCollection<CustomerContactLink> _CustomerContact; public ObservableCollection<CustomerContactLink> CustomerContact { get { if (_CustomerContact == null) _CustomerContact = new ObservableCollection<CustomerContactLink>(); return _CustomerContact; } set { _CustomerContact = value; } } private PagedCollectionView _CustomerContactPaged; public PagedCollectionView CustomerContactPaged { get { if (_CustomerContactPaged == null) _CustomerContactPaged = new PagedCollectionView(CustomerContact); return _CustomerContactPaged; } } private TicketSystemDataContext _ctx; public TicketSystemDataContext ctx { get { if (_ctx == null) _ctx = new TicketSystemDataContext(); return _ctx; } } public void GetAll() { ctx.Load(ctx.GetCustomerContactInfoQuery(), LoadCustomerContactsComplete, null); } private void LoadCustomerContactsComplete(LoadOperation<CustomerContactLink> lo) { foreach (var entity in lo.Entities) { CustomerContact.Add(entity as CustomerContactLink); } } #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; private void RaisePropertyChanged(string propertyName) { if (PropertyChanged != null) { this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } #endregion } Here is the basics of my XAML <Data:DataGrid x:Name="GridCustomers" MinHeight="100" MaxWidth="1000" IsReadOnly="True" AutoGenerateColumns="False"> <Data:DataGrid.Columns> <Data:DataGridTextColumn Header="First Name" Binding="{Binding Customer.FirstName}" Width="105" /> <Data:DataGridTextColumn Header="MI" Binding="{Binding Customer.MiddleName}" Width="35" /> <Data:DataGridTextColumn Header="Last Name" Binding="{Binding Customer.LastName}" Width="105"/> <Data:DataGridTextColumn Header="Address1" Binding="{Binding Contact.Address1}" Width="130"/> <Data:DataGridTextColumn Header="Address2" Binding="{Binding Contact.Address2}" Width="130"/> <Data:DataGridTextColumn Header="City" Binding="{Binding Contact.City}" Width="110"/> <Data:DataGridTextColumn Header="State" Binding="{Binding Contact.State}" Width="50"/> <Data:DataGridTextColumn Header="Zip" Binding="{Binding Contact.Zip}" Width="45"/> <Data:DataGridTextColumn Header="Home" Binding="{Binding Contact.PhoneHome}" Width="85"/> <Data:DataGridTextColumn Header="Cell" Binding="{Binding Contact.PhoneCell}" Width="85"/> <Data:DataGridTextColumn Header="Email" Binding="{Binding Contact.Email}" Width="118"/> </Data:DataGrid.Columns> </Data:DataGrid> <DataForm:DataForm x:Name="CustomerDetails" Header="Customer Details" AutoGenerateFields="False" AutoEdit="False" AutoCommit="False" CommandButtonsVisibility="Edit" Width="1000" Margin="0,5,0,0"> <DataForm:DataForm.EditTemplate> </DataForm:DataForm.EditTemplate> </DataForm:DataForm> And here is my code behind public Customers() { InitializeComponent(); BusyDialogIndicator.IsBusy = true; Loaded += new RoutedEventHandler(Customers_Loaded); CustomerDetails.BeginningEdit += new EventHandler(CustomerDetails_BeginningEdit); } void CustomerDetails_BeginningEdit(object sender, System.ComponentModel.CancelEventArgs e) { CustomerContacts.CustomerContactPaged.EditItem(CustomerDetails.CurrentItem); } private void Customers_Loaded(object sender, RoutedEventArgs e) { CustomerContacts = new CustomerContactLinks(); CustomerContacts.GetAll(); GridCustomers.ItemsSource = CustomerContacts.CustomerContactPaged; GridCustomerPager.Source = CustomerContacts.CustomerContactPaged; GridCustomers.SelectionChanged += new SelectionChangedEventHandler(GridCustomers_SelectionChanged); BusyDialogIndicator.IsBusy = false; } void GridCustomers_SelectionChanged(object sender, SelectionChangedEventArgs e) { CustomerDetails.CurrentItem = GridCustomers.SelectedItem as CustomerContactLink; } private void SaveChanges_Click(object sender, RoutedEventArgs e) { if (WebContext.Current.User.IsAuthenticated) { bool commited = CustomerDetails.CommitEdit(); if (commited && (!CustomerDetails.IsItemChanged && CustomerDetails.IsItemValid)) { CustomerContacts.Update(CustomerDetails.CurrentItem as CustomerContactLink); CustomerContacts.ctx.SubmitChanges(); CustomerContacts.CustomerContactPaged.CommitEdit(); CustomerContacts.CustomerContactPaged.Refresh(); (GridCustomers.ItemsSource as PagedCollectionView).Refresh(); } } }

    Read the article

  • Silverlight 4 NewBie Question

    - by codemnky
    I am watching a video from Silverlight.net website about DataForm. There is no source code download, so I am typing in the code as I watch the video. Unfortunately I can't replicate what is shown in the video. there are several issues. I am going to list out only the first 2 1) The presenter shows a simple class inside DataForm that has a icon at the very top of the data form that upon clicking it makes the DataForm editable and a save button appears at the bottom. I did'nt get the same thing when I ran my code against Silverlight 4 or Silverlight 3 2) Than he goes on to show that if you mark your class [Bindable(false)] you shouldn't see anything in your page. I did that but my form still shows all the properties I stopped after these 2 issues. If the features being talked about in this video were deprecated in the final release than this video should have been taken off the site. can anyone help me with this??

    Read the article

  • Why should I use MVVM when it breaks built in riaservices functionality

    - by Jakob
    I'm struggling to grasp why MVVM is really a good pattern to implement in riaserivces, To me there's nothing but trouble to it, it just add's another tier that I have to code. I Get that I could change the UI, but really I don't need to. Instead i won't be able to user out of the box functionality with riaservices, datagrid, dataform all controls require some implementation. Why can't it just be simple? Is there really no way to get MVVM to automatically set "IsBusy" and all the dataform edit functionality. It's like reinventing the wheel to me, and it seems that I'd be able to write code much faster just using riaservices

    Read the article

  • Why should I use MVVM when it breaks built in functionality

    - by Jakob
    I'm struggling to grasp why MVVM is really a good pattern to implement in riaserivces, To me there's nothing but trouble to it, it just add's another tier that I have to code. I Get that I could change the UI, but really I don't need to. Instead i won't be able to user out of the box functionality with riaservices, datagrid, dataform all controls require some implementation. Why can't it just be simple? Is there really no way to get MVVM to automatically set "IsBusy" and all the dataform edit functionality. It's like reinventing the wheel to me, and it seems that I'd be able to write code much faster just using riaservices

    Read the article

  • Silverlight Cream for March 22, 2010 -- #817

    - by Dave Campbell
    In this Issue: Bart Czernicki, Tim Greenfield, Andrea Boschin(-2-), AfricanGeek, Fredrik Normén, Ian Griffiths, Christian Schormann, Pete Brown, Jeff Handley, Brad Abrams, and Tim Heuer. Shoutout: At the beginning of MIX10, Brad Abrams reported Silverlight 4 and RIA Services Release Candidate Available NOW From SilverlightCream.com: Using the Bing Maps Silverlight control on the Windows Phone 7 Bart Czernicki has a very cool BingMaps and WP7 tutorial up... you're going to want to bookmark this one for sure! Code included and external links... thanks Bart! Silverlight Rx DataClient within MVVM Tim Greenfield has a great post up about Rx and MVVM with Silverlight 3. Lots of good insight into Rx and interesting code bits. SilverVNC - a VNC Viewer with Silverlight 4.0 RC Andrea Boschin digs into Silverlight 4 RC and it's full-trust on sockets and builds an implementation of RFB protocol... give it a try and give Andrea some feedback. Chromeless Window for OOB applications in Silverlight 4.0 RC Andrea Boschin also has a post up on investigating the OOB no-chrome features in SL4RC. Windows Phone 7 and WCF AfricanGeek has his latest video tutorial up and it's on WCF and WP7... I've got a feeling we're all going to have to get our arms around this. Some steps for moving WCF RIA Services Preveiw to the RC version Fredrik Normén details his steps in transitioning to the RC version of RIA Services. Silverlight Business Apps: Module 8.5 - The Value of MEF with Silverlight Ian Griffiths has a video tutorial up at Channel 9 on MEF and Silverlight, posted by John Papa Introducing Blend 4 – For Silverlight, WPF and Windows Phone Christian Schormann has an early MIX10 post up about te new features in Expression Blend with regard to Silverlight, WPF, and WP7. Building your first Silverlight for Windows Phone Application Pete Brown has his first post up on building a WP7 app with the MIX10 bits. Lookups in DataGrid and DataForm with RIA Services Jeff Handley elaborates on a post by someone else about using lookup data in the DataGrid and DataForm with RIA Services Silverlight 4 + RIA Services - Ready for Business: Starting a New Project with the Business Application Template Brad Abrams is starting a series highlighting the key features of Silverlight 4 and RIA with the new releases. He has a post up Silverlight 4 + RIA Services - Ready for Business: Index, including links and source. Then in this first post of the series, he introduces the Business Application Template. Custom Window Chrome and Events Watch a tutorial video by Tim Heuer on creating custom chrome for OOB apps. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for April 03, 2010 -- #829

    - by Dave Campbell
    In this Issue: Scott Marlowe, Nokola, SilverLaw, Brad Abrams, Jeff Wilcox, Jesse Liberty, Alexey Zakharov, ondrejsv, Ward Bell, and David Anson. Shoutouts: Bart Czernicki has a post up about the latest with HTML5: HTML 5 is Born Old - Quake in HTML 5 I was sent a link to shoebox360 a while back and had to sign up to see the Silverlight use, but it does work very nice. I like the panoramic carousel in the viewer: shoebox360 Jeff Handley has a post up on RIA Services - Documentation Guidance and Community Samples... the team is looking for feedback from all of us Shawn Wildermuth posted his My MIX Talks' Source Code Laurent Bugnion posted his Sample code and slides for my TechDays10 (Belgium) talks From SilverlightCream.com: Silverlight to WCF Cross Domain SecurityException Scott Marlowe wrote an article about an often-encountered security exception having to do with cross-domain policies. He details the problem, the response, the solution, and yet another problem/solution associated... good stuff, Scott! Simple Functions for HTML Interop You've seen Nokola's graphic work... how about some HTML Interop from him? He's exposing the code he uses in his work. New Video: ChildWindow Styling - Silverlight 3 SilverLaw has a new video tutorial on Silerlight 3 ChildWindow Styling up - in German - but the video is language-agnostic :) Silverlight 4 + RIA Services - Ready for Business: Exposing WCF (SOAP\WSDL) Services Brad Abrams' continuation in his RIA series is this one demonstrating exposing RIA Services as a Soap\WSDL service Silverlight 4: New parser implementation. New parser features. Jeff Wilcox has a post up highlighting some of the new features in Silverlight 4 such as a new parser implementation with new XAML features. New Video Series – Getting Started With Silverlight Jesse Liberty is starting a new video tutorial series that's going to build out to be a "complete survey of Silverlight programming". The first two are in this post and are Getting Started and Adding Controls to a Silverlight App... looks like good material, Jesse, and all the source is there for the taking as well. Silverlight layout hack: Centered content with fixed maxwidth Alexey Zakharov has a quick tip up on creating centered content with fixed maxwidth. He calls it a dirty trick... looks like code to me :) Silverlight DataForm’s autogenerated fields send empty strings to database ondrejsv points up a problem he had with the Toolkit's DataForm, and his solution to it... with code for all of us following along behind :) DevForce Extensibility With MEF InheritedExport Ward Bell has a post up describing how they got DevForce MEF'd up, and looks like a good post to get you all excited about MEF as well... lots of external links and good info. Tip: Read-only custom DependencyProperties don't exist in Silverlight, but can be closely approximated David Anson's latest Tip is about Read-only custom DependencyProperties in Silverlight -- which strictly is not possible, but he has a code example up that gets close. Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

  • Silverlight Cream for May 25, 2010 - 2 -- #870

    - by Dave Campbell
    In this Issue: Kirupa, Matthias Shapiro(-2-, -3-), Giorgetti Alessandro, Kunal Chowdhury, Mike Snow, and Jason Zander. Shoutout: This looks like a really nice WP7 app done by a team of folks for Imagine Cup 2010: Ahead ... I hope to see some blog posts and code on this! From SilverlightCream.com, and remember you can send me a link to your post or submit at SilverlightCream.com: Control Storyboards Easily using Behaviors Kirupa is following through on a promise to discuss the Behaviors that come on-board Blend. He's starting with two to help deal with Storyboards: ControlStoryboardAction and the StoryboardCompletedTrigger. PHP, MySQL and Silverlight: The Complete Tutorial (Part 1) Matthias Shapiro has a 3-parter up on PHP, MySQL, and Silverlight -- wondered how I missed this first one until I realized they all posted in 2 days... this first post sets up the MySQL database to be used. PHP, MySQL, and Silverlight: The Complete Tutorial (Part 2) In part 2, Matthias Shapiro writes a PHP web service that grabs the data from the database and sends it in JSON format to the Silverlight app (see part 3). PHP, MySQL, and Silverlight: The Complete Tutorial (Part 3) Matthias Shapiro's part 3 is the Silverlight part that reads the JSON produced by the PHP webservice from Part 2, to provide display and edits of the data... and this whole series includes source. Silverlight: adding an IsEditing property to the DataForm Giorgetti Alessandro laments the lack of an IsEditing property in the DataForm, then goes on to demonstrate his path to a suitable workaround. Step-by-Step Command Binding in Silverlight 4 Kunal Chowdhury has a nicely-detailed post on Command Binding in Silverlight 4 and builds up a demo MVVM app in the process... source project included. Silverlight Tip of the Day #24 – Resolving Unknown Objects in VS I'm not sure I would call Mike Snow's latest Silverlight Tip 'Silverlight' ... but if you don't know it, you need to. Sample: Windows Phone 7 Example Application with Landscape Layout Whoa... check out the WP7 app Jason Zander did with landscape mode defined... you're going to want to refer back to this one... Stay in the 'Light! Twitter SilverlightNews | Twitter WynApse | WynApse.com | Tagged Posts | SilverlightCream Join me @ SilverlightCream | Phoenix Silverlight User Group Technorati Tags: Silverlight    Silverlight 3    Silverlight 4    Windows Phone MIX10

    Read the article

1 2  | Next Page >