Hello there.
i am trying in xamarin c# to do the following scenario :
want to pass a List<NSObject> with string values to a Datasource (this works ok)
but i want to put the column definitions without having any property to export
example :
List<NSObject> foo = new List<NSObject>();
foo.Add(new NSString("a"));
foo.Add(new NSString("b"));
foo.Add(new NSString("c"));
IGGridViewDataSourceHelper datasource = new IGGridViewDataSourceHelper();
IGGridViewColumnDefinition colSubject = new IGGridViewColumnDefinition(); //(Without having any public property) colSubject.HeaderText = @"issue"; datasource.ColumnDefinitions.Add(colSubject);
datasource.Data = foo.ToArray(); _gridView.WeakDataSource = datasource;
_gridView.ReloadData();
this crash because in column definition don't have any property;
But i want to pass a array of values and the columns by hand without having any NSOBject Class that exports some properties.
Is this possible with any way?
Hi Peter
Yes you can do that!
Just use the IGGridViewValueColumnDefinition instead. Note, you still have to pass a key, but it can be anything.
Hope this helps!
-SteveZ
Yes this works, does this support multiple columns?
i mean if i want to make a dynamic screen with grid view that return from one system a list of strings that are one row with multiple columns can i have IGGridViewValueColumnDefinition with more that one column? Because i saw that if i put a second IGGridViewValueColumnDefinition then the values repeat itself in the second column.
The thing is that if you want to make a dynamic screen with one grid view that accepts parameters in controller to manage your screen you can't if i need to make anytime a wrapper class of NSObject type and export public properties. So i try to make a solution in my project about this.
any ideas?