Hey guys,
Could somebody please tell me why this does not create columns in the grid?
//create grid
UltraGrid grid = new UltraGrid();
//assign datasource to a list (IList)
grid.DataSource = new CalcList { new CalcBO() };
//Bind the grid
grid.DataBind();
Simple, bu it doesn't work. I noticed though that if I add the grid via the designer it works (as opposed to declare it with code).
Thanks in advance.
Is the grid on a form? If you're creating the grid in code and it's not on anything, at the very least it needs a binding context, so do:
grid.BindingContext = new BindingContext();
-Matt
I will try that, thanks !!!!!!