This question is locked. New answers and comments are not allowed.
Given a simple collection of strings, like this:
binding to a plain gridview like this:
gives us a gridview with one column named "Length" and rows populated with the string.Length of the items in the collection.
We can also see this behavior on the Telerik demo page, here:
http://demos.telerik.com/silverlight/beta/#GridView/DataSources
Clicking on the "Simple List" option binds the gridview to a simple list of strings, shown in the example code like this:
but again, it does not display a list of customer names, but a column named "Length", and rows populated with string.Length of the items in the collection.
Is this really the desired behavior? What if I actually want to show the strings, and not their length?
Thanks.
| ObservableCollection<string> items = new ObservableCollection<string>(); |
| for (int i = 0; i < 5; i++) { |
| items.Add(String.Format(itemName + ".Item" + i)); |
| } |
binding to a plain gridview like this:
| aGridView.ItemsSource = items; |
gives us a gridview with one column named "Length" and rows populated with the string.Length of the items in the collection.
We can also see this behavior on the Telerik demo page, here:
http://demos.telerik.com/silverlight/beta/#GridView/DataSources
Clicking on the "Simple List" option binds the gridview to a simple list of strings, shown in the example code like this:
| List<string> list = new List<string>(); |
| foreach (Customer customer in ExamplesDB.GetCustomers()) |
| { |
| list.Add(customer.ContactName); |
| } |
but again, it does not display a list of customer names, but a column named "Length", and rows populated with string.Length of the items in the collection.
Is this really the desired behavior? What if I actually want to show the strings, and not their length?
Thanks.
