I'm sure that this will sound like a ridiculous question to experienced c# programmers, but here goes. I would like to be able to dynamically create splitter panels from database table entries, but cannot name the new instance of the RadSlidingPlane class as the correct type. The logic of what I want to do is below.
_conn.Open();
SqlCommand command = new SqlCommand("SELECT ID,TabTitle,Description FROM WidgetTypes", _conn);
SqlDataReader widgettypelist = command.ExecuteReader();
if (widgettypelist.HasRows)
{
widgettypelist.Read();
RadSlidingPane "SlidingPane" + widgettypelist["ID"].ToString() = new RadSlidingPane();
SlidingPaneX.Scrolling =
SplitterPaneScrolling.None;
SlidingPaneX.Title = widgettypelist[
"TabTitle"];
Radslidingzone1.Controls.Add(SlidingPaneX);
WidgetGalleryControl1.WidgetType = widgettypelist[
"ID"];
}
_conn.Close();
All help greatfully received.