The following forum(s) have migrated to Microsoft Q&A (Preview): Developing Universal Windows apps!
Visit Microsoft Q&A (Preview) to post new questions.

Learn More

[UWP][C#][XAML] SQL webservice, dynamically create grid/layout from SQL data RRS feed

  • Question

  • Hi

    We would like to create a gridview or something similar which could auto populate from data that is in SQL


    COlumn 1 - textbox

    Column 2 - textbpx

    Column 3 - textbox

    We have data in SQL table called questions.

    we want to populate/create a gridview with the questions from SQL table, and for each question create a checkbox and a textbox

    any help is greatly appreciated

    Monday, August 29, 2016 5:29 AM


All replies

  • What type of app are you writing? Please title your post per Guide to posting: subject line tagsAlert me.

    You'll want to read your data into a local collection and then databind your grid to that collection. How specifically to do this will depend on the type of app. For example, if you're using WinJS take a look at and

    Monday, August 29, 2016 5:37 AM
  • apologies Rob

    windows 10 UWP app, I have web service to talk to my SQL server

    Monday, August 29, 2016 8:58 AM
  • JavaScript? Xaml? Direct3D? Please title your post per Guide to posting: subject line tagsAlert me.
    Tuesday, August 30, 2016 2:21 AM
  • C# XAML app written in visual studio 2015, which is connecting to my SQL server via WCF
    Tuesday, August 30, 2016 2:41 AM
  • Create a class which represents your data records and load your data into an ObservableCollection of that class type, then data bind the collection to the ListView or GridView. Create an ItemTemplate to expose your data as the columns that you'd like.

    See List view and grid view and List view item templates in the documentation and the XAML ListView and GridView sample for more details.

    Tuesday, August 30, 2016 10:41 PM