1.

Write A Program To Display The Use Of Multiple Columns In Datagrid?

Answer»
  • The DATAGRID that is used CONTAINS the provision to have multiple columns to contain the data in an easy and ordered way. 
  • Every column in the multiple columns is having different property of the objects and having collection of items. 
  • The objects are named according to the properties given from get/SET properties and the PUBLIC data field in this case can’t be created. 

The program that shows the creation of multiple columns in DataGrid is as follows:

public struct MyData
{
public string name { set; get; }
public int age { set; get; }
}
dataGrid1.Items.Add(
new MyData(){name="John",age=25});
dataGrid1.Items.Add(
new MyData(){name = "JILL",age = 29 });

The program that shows the creation of multiple columns in DataGrid is as follows:

public struct MyData
{
public string name { set; get; }
public int age { set; get; }
}
dataGrid1.Items.Add(
new MyData(){name="John",age=25});
dataGrid1.Items.Add(
new MyData(){name = "Jill",age = 29 });



Discussion

No Comment Found