Dim ComboBox1 As New Telerik.WinControls.UI.RadComboBox |
Dim cn As OleDbConnection |
Dim connString As String = ligacao |
cn = New OleDbConnection(connString) |
cn.Open() |
Dim da As New OleDb.OleDbDataAdapter(sql, cn) |
Dim ds As DataSet = New DataSet |
da.Fill(ds, "Tabela") |
With ComboBox1 |
.DataSource = ds.Tables(0) |
.DisplayMember = "D1" |
.ValueMember = "D2" |
End With |
private void gviAufgaben_ToolTipTextNeeded(object sender, ToolTipTextNeededEventArgs e) | |
{ | |
GridDataCellElement cell = sender as GridDataCellElement; | |
if (cell != null) | |
{ | |
ComponentBehavior behavior = cell.ElementTree.ComponentTreeHandler.Behavior; | |
PropertyInfo tooltip = behavior.GetType().GetProperty("ToolTip", BindingFlags.NonPublic | BindingFlags.Instance); | |
object tip = tooltip.GetValue(behavior, null); | |
PropertyInfo autoPopDelay = tip.GetType().GetProperty("AutoPopDelay"); | |
autoPopDelay.SetValue(tip, 60000, null); | |
e.ToolTipText = cell.Value.ToString(); | |
} | |
} |
if (AfterClosed != null)
{
AfterClosed(sender, e);
}
}
private void SaveAllChildren(ControlCollection controls)
{
foreach (Control c in controls)
{
SaveAllChildren(c.Controls);
if (c as IDockManager != null)
{
IDockManager dManager = c as IDockManager;
foreach (IDockingSite site in dManager.DockingSites)
{
foreach (IDockable panel in site.ManagedDockables)
{
if (panel as SubClassedDockPanel != null)
{
(panel as SubClassedDockPanel).Save();
}
}
}
return;
}
}
}
basically I look for any DockingManagers in the parent DockPanel's controls and then iterate over all of their ManagedDockables in all the DockingSites. This works with the exception of when I AutoHide a child DockPanel.
There are a few difficulties I've encountered regarding "AutoHide". First is that it causes the Closed event to fire on the child panel that is being unpinned. I'd like to understand why this is happening, and (leading into my second difficulty) where does it go? The algorithm above will not find the autohidden DockPanel.
Any assistance is greatly appreciated, I know I've posted a few questions today,
Sid