Ive looked about 50 or more webpages about this control. and it seems to me that it might be useless to me.
It seams that the "GridView" is a "View" of the "ListView" control. i dont have any issues in using the control and loading data but manipulating it seems to be difficult.
public partial class Designer : UserControl
{
public Designer()
{
InitializeComponent();
List<RandomData> NewItem = new List<RandomData>();
NewItem.Add(new RandomData { Column1 = "Item1", Column2 = "MoreData", Column3 = "MoreData", Column4 = "MoreData" });
ListView_1.ItemsSource = NewItem;
}
}
public class RandomData
{
public String Column1 { get; set; }
public String Column2 { get; set; }
public String Column3 { get; set; }
public String Column4 { get; set; }
}
Simple enough, it loads the data into the columns. however what it i want to load other stuff in there. like a checkbox or a image file or something.
public Designer()
{
InitializeComponent();
CheckBox AttemptThis = new CheckBox();
AttemptThis.Content = "Testing";
AttemptThis.IsChecked = true;
List<RandomData> NewItem = new List<RandomData>();
NewItem.Add(new RandomData { Column1 = AttemptThis, Column2 = "MoreData", Column3 = "MoreData", Column4 = "MoreData" });
ListView_1.ItemsSource = NewItem;
}
}
public class RandomData
{
public CheckBox Column1 { get; set; }
public String Column2 { get; set; }
public String Column3 { get; set; }
public String Column4 { get; set; }
}
And i get the checkbox.tostring() appear in the column??
is this control going to be able to do this? Also is there a way to have a checkbox or image appear if the cell is a certian value ?