1.

What Are The Ways That Properties Can Be Shown In Datagrid?

Answer»
  1. DataGrid shows the properties in the form of COLUMNS and each COLUMN STORE some value. 
  2. DataGrid need two columns and each of them is bound to have one property each and that is ALSO different from one another. 
  3. After creating the two columns with the properties the BINDING should be done of those columns to display the data. 

The ways are being shown as:

DataGridTextColumn col1 = new DataGridTextColumn();
col1.Binding = new Binding("name");
DataGridTextColumn col2 = 
new DataGridTextColumn();
col2.Binding = new Binding("age"); 
dataGrid1.Columns.Add(col1);
dataGrid1.Columns.Add(col2);

The ways are being shown as:

DataGridTextColumn col1 = new DataGridTextColumn();
col1.Binding = new Binding("name");
DataGridTextColumn col2 = 
new DataGridTextColumn();
col2.Binding = new Binding("age"); 
dataGrid1.Columns.Add(col1);
dataGrid1.Columns.Add(col2);



Discussion

No Comment Found