isa
isa

Reputation: 1085

How to create a new group in a grid view and add items to it?

// Create a new grid view, add content, 
GridView gridView1 = new GridView();
gridView1.Items.Add("Item 1");
gridView1.Items.Add("Item 2");

// Add the grid view to a parent container in the visual tree.
stackPanel1.Children.Add(gridView1);

How to create a new group in gridView1 and add items to it?

Upvotes: 0

Views: 470

Answers (1)

Rajmohan Kathiresan
Rajmohan Kathiresan

Reputation: 338

You can add/remove groups in the grid view and manage it easily by binding a data source. When you change the data source , grid view will automatically refresh its contents. To get the basic understanding , analyze the Grid App(XAML) project template provided under Visual C# section of the "New Project" dialog.

Upvotes: 1

Related Questions