Do you have an example of creating individual wingrid objects on your tab control progmatically? Or your winchart control?
Any help would be appreciated.
Thanks
Hi,
I'm afraid I don't really understand the question. Creating a control programmatically is the same for any control. There's nothing specific about WinGrid or WinChart that would make them any different that any other bound control in this regard.
You would declare the new control, then add it to the TabPanel's control's collection and probably set the DataSource/DataMember.
"Can only add an UltraTabPageControl to an UltraTabControl."
Grid1 = New UltraWinGrid.UltraGrid
.Name = "Testgrid"
.Text = "xxx"
.DisplayLayout.Bands(0).AutoPreviewEnabled = True
.DisplayLayout.Bands(0).Columns.Add("test1")
End With
UltraTabControl1.Controls.Add(Grid1)
Okay, the problem is that you are trying to add the grid to the tab control, instead of a TabPage within that tab control. You want the grid to be on a tab, not just within the tab control itself - at least I would assume that's what you want. So the code would look something like this:
UltraTabControl1.Tabs("My Tab").TabPage.Controls.Add(Grid1)
Ok, add this line of code:
UltraTabControl1.Tabs("tab1").TabPage.Controls.Add(Grid1)
and got this error msg:
"Key not found Parameter name: key"
Whats up? Do you by chance have a sample code on this subject?
Thanks,
PR
The error message seems to indicate that you do not have a tab who's key is "tab1".