locked
SketchFlow and dataform. How? RRS feed

  • Question

  • I'm experimenting with SketchFlow and have managed to place a Silverlight datagrid control on a form and populate it with sample data. What I'm trying to do next is place a Silverlight dataform below the datagrid so that the former will display the grid's selected row's information for editing. I've put the dataform in place and then tried to drag and drop the fields from my sample collection data onto the dataform. What I ended up seeing is a grid containing the fields. Furthermore, the grid container is not inside the dataform (the object that I had selected for the drop target).

    Obviously I'm not doing this correctly. So, can anyone tell me how I'd go about getting my selected fields from my sample data into a dataform and have this synchronized with the selected record in the datagrid?

    TIA.
    Wednesday, September 23, 2009 5:21 PM

Answers

  • While the DataGrid has very sophisticated support in Blend 3, that is not the case with DataForm. With that standard disclaimer, this scenario should be pretty straightforward :) - here is a set of steps.

    a) Create a new Silverlight 3 SketchFlow application
    b) Create a new DataGrid.
    c) This is a key step - Create a Grid.
    d) Inside that Grid, create a DataForm
    e) Create a new sample data source
    f) Drag and drop the Collection node onto the DataGrid - your master DataGrid visualization is now done. If you did not want to visualize all the properties in the collection, you can select specific properties and drag and drop.
    g) Switch to the Details mode in the Data pane
    h) Drag and drop the Collection node onto the DataForm - in the Dialog that is presented, seletct CurrentItem as the property

    Build and run the application. Now, whenever a row is selected in the DataGrid, the DataForm shows the data for that row.

    Thanks,
    Unni
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by MikeSP Monday, September 28, 2009 2:13 PM
    Saturday, September 26, 2009 7:56 PM

All replies

  • Wow. No replies after almost two days.

    Isn't the datagrid and dataform two of the controls that are supposed to make Silverlight finally "ready for business" apps?

    I can't believe that I'm the only one trying to do this...anyone?
    Friday, September 25, 2009 1:45 PM
  • While the DataGrid has very sophisticated support in Blend 3, that is not the case with DataForm. With that standard disclaimer, this scenario should be pretty straightforward :) - here is a set of steps.

    a) Create a new Silverlight 3 SketchFlow application
    b) Create a new DataGrid.
    c) This is a key step - Create a Grid.
    d) Inside that Grid, create a DataForm
    e) Create a new sample data source
    f) Drag and drop the Collection node onto the DataGrid - your master DataGrid visualization is now done. If you did not want to visualize all the properties in the collection, you can select specific properties and drag and drop.
    g) Switch to the Details mode in the Data pane
    h) Drag and drop the Collection node onto the DataForm - in the Dialog that is presented, seletct CurrentItem as the property

    Build and run the application. Now, whenever a row is selected in the DataGrid, the DataForm shows the data for that row.

    Thanks,
    Unni
    This posting is provided "AS IS" with no warranties, and confers no rights.
    • Marked as answer by MikeSP Monday, September 28, 2009 2:13 PM
    Saturday, September 26, 2009 7:56 PM
  • Thanks Unni. That's what I was looking for.
    Monday, September 28, 2009 2:13 PM
  • I too am experimenting with SketchFlow and have managed to place a Silverlight datagrid control on a form and populate it with sample data. I followed the instructions in the training video and also attempted the instructions in the previous entry. I had a problem with the instructions in that I couldnt add a grid (couldnt find a 'grid' control) into which I should add the Dataform. What i did was to have a working datagrid which i tested in browser. I added a dataform and then attempted to add the Collection to the datafrom (g). When I tried this is it did not offer me a dialog (h)  to set the CurrentItem property. 

    I must have stuffed up somewhere any ideas?

    Thanks,

    Michael 
    Wednesday, January 27, 2010 5:46 AM