views:

54

answers:

2

Hi ,

How can i create a table at runtime in Silverlight. In my project i am migrating from asp.net to Silverlight . In asp.net i use Response.Write("");

In this way i generate a table . please let me know how i can generate a table in similar way at runtime in Silverlight ..

Edit Content from "answer"

My Grid has to look as shown below . I did this in asp.net using the response.write . any idea how can i achieve this in Silverlight .

Please find below how my datagrid should look . Is it possible please help .

  0    1    2     3    4   
Green red orange blue black
A: 

Do you want a data grid?

Than you can create it using C# code constructing the object graph for a datagrid and than adding it to the view.

But perhaps you should better explain your question, why do you want to create a table at runtime?

Davy Landman
My Grid has to look as shown below . I did this in asp.net using the response.write . any idea how can i achieve this in Silverlight .Please find below how my datagrid should look . Is it possible please help .0 1 2 3 4Green red orange blue black
Mahadesh
A: 

If your table is used for layouting, you can create a Grid control dynamically

If your table is really used for what is has been designed for (i.e. display tabular data), you can create a DataGrid control dynamically

vc 74
My Grid has to look as shown below . I did this in asp.net using the response.write . any idea how can i achieve this in Silverlight .Please find below how my datagrid should look . Is it possible please help .0 1 2 3 4Green red orange blue black
Mahadesh