_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.
In my project I need to set right to left at page load time. Is there a way to access RADControl collection on current page so I can use a general function to set all controls’ RTL property?
Here is my unsuccessful code snippet:
| protected void Page_Load(object sender, EventArgs e) |
| { |
| //testing Right-to-left layout for Rad Control |
| SetRControlsRightToLeftLayout(this, true); |
| } |
| protected void SetRControlsRightToLeftLayout(Control context, bool isSetRightToLeft) |
| { |
| foreach (Control c in context.Controls) |
| { |
| Control rControl = c as Control;//RadControl rControl = c as RadControl; |
| if (rControl != null) |
| { |
| if (rControl.GetType().ToString().StartsWith("Telerik.Web.UI",StringComparison.Ordinal)) |
| { |
| System.Diagnostics.Debug.WriteLine(rControl.GetType()); |
| } |
| if (rControl.HasControls()) |
| { |
| SetRControlsRightToLeftLayout(rControl, isSetRightToLeft); |
| } |
| } |
| } |
| } |