Hi There: I have a project in WPF C#. In my code, I am creating a new object(string object) from a loop and adding that string object in a List. Now in my XAML code I have added a Grid(myGrid). How Can I show the List of my Array objects in this Grid(Like a table). The Grid has 3 columns with heading: "Name", "Old Text", "New Text".
Some thing Like:
Public Class myObj
private string mname,mOldV, mNewV;
Class myObj(string name, string OldV, NewV)
}//end of myObj
Public class Mainclass
private List<MyObj> lObj=Null;
public sub asub
mObj = new MyObj("a",b","c"); //I will change this value
myGrid.DataContext=mObj;//I dont know this one
}//end of asub
Qustion: I need the code part of the Grid in XAML to bind the List of myObj and also correct code(above) in C#.
1 Replies - 2171 Views - Last Post: 24 July 2013 - 09:21 AM
Replies To: Add an String type array list in a Grid in C# in WPF
Page 1 of 1