Hi, I've tried to create a radGridView control programmatically so I can host it inside of a radHostControl, I do believe the problem has nothing to do with hosting as it occurs before I host it. : When I create teh control using the following code, I give it a Datasource which has data, however the control reports that it has no columns in its properties. And continuing, the control actually shows the data and all the columns when the app is live; the problem being I can't access these columns as they apparently do not exist:
RadGridView gridView = new RadGridView();
Telerik.WinControls.UI.TableViewDefinition tableViewDefinition14 = new Telerik.WinControls.UI.TableViewDefinition();
gridView.BeginInit();
gridView.MasterTemplate.BeginInit();
gridView.Size = new Size(100, 300);
gridView.AutoGenerateColumns = true;
gridView.DataSource = blacklistProps;
getBlacklist();
gridView.MasterTemplate.AllowAddNewRow = false;
gridView.MasterTemplate.AllowColumnChooser = false;
gridView.MasterTemplate.AllowColumnHeaderContextMenu = false;
gridView.MasterTemplate.ShowColumnHeaders = false;
gridView.MasterTemplate.ShowFilteringRow = false;
gridView.MasterTemplate.ShowRowHeaderColumn = false;
gridView.MasterTemplate.ViewDefinition = tableViewDefinition14;
gridView.Name = "blacklistGridView";
gridView.RootElement.MinSize = new System.Drawing.Size(0, 0);
gridView.ShowGroupPanel = false;
//gridView.Size = new System.Drawing.Size(316, 381);
gridView.TabIndex = 0;
gridView.ContextMenuOpening += new Telerik.WinControls.UI.ContextMenuOpeningEventHandler(this.gridViewMappings_ContextMenuOpening);
gridView.MasterTemplate.EndInit();
gridView.EndInit();