or
| private void SetLayout(string layouts) |
| { |
| for (int i = 0; i < zone.Length; i++) |
| { |
| zone[i] = LoadZone(pageID, langID, i); |
| zone[i].Skin = "Default"; |
| zone[i].ID = "ZoneLayout" + i; |
| } |
| Table tt = WebCMSTemplate.WidgetHelpers.WidgetHelper.GetLayout1(zone[0], zone[1], zone[2], zone[3], zone[4]); |
| siteLayout.Controls.Add(tt); |
| tt.ID = "bodyLayoutCC"; |
| } |
| public RadDockZone LoadZone(string pagename, string language, int zoneid) |
| { |
| RadDockZone zone = new RadDockZone(); |
| if (!adminEnabled) |
| { |
| zone.MinHeight = Unit.Pixel(1); |
| zone.MinWidth = Unit.Pixel(1); |
| } |
| CMSLayerDataContext db = new CMSLayerDataContext(); |
| var cmsWidgets = from p in db.CMSWidgets |
| where p.pageName.Equals(pagename) && p.language.Equals(language) && p.zoneNo.Equals(zoneid) |
| orderby p.sequence descending |
| select p; |
| foreach (CMSWidget cmswidget in cmsWidgets) |
| { |
| Control cn = LoadControl(cmswidget.controlascx); |
| cn.ID = cmswidget.widget.ToString(); |
| zone.Controls.Add(CreateDockWidget(cn, cmswidget.title, true, cmswidget.widget, cmswidget.height, cmswidget.width, cmswidget.nonadminStyle)); |
| } |
| return zone; |
| } |
| public RadDock CreateDockWidget(Control cont, string title, bool showTitleBar, Guid widgetId, int? height, int? width, string nonadminHandle) |
| { |
| RadDock dock = new RadDock(); |
| dock.Title = "Dock"; |
| dock.Text = string.Format("Added at {0}", DateTime.Now); |
| dock.Width = Unit.Pixel(300); |
| dock.Skin = "Default"; |
| dock.UniqueName = widgetId.ToString(); |
| dock.ID = "dock(" + widgetId.ToString() + ")"; |
| dock.Commands.Add(new DockExpandCollapseCommand()); |
| //dock.Title = title; |
| dock.Title = dock.ID; |
| if (height.HasValue) |
| { |
| dock.Height = Unit.Pixel(int.Parse(height.ToString())); |
| } |
| if(width.HasValue) |
| { |
| dock.Width = Unit.Pixel(int.Parse(width.ToString())); |
| } |
| dock.ContentContainer.Controls.Add(cont); |
| dock.DockMode = DockMode.Docked; |
| if (adminEnabled) |
| { |
| dock.Commands.Add(new DockCloseCommand()); |
| dock.DockHandle = DockHandle.TitleBar; |
| dock.AutoPostBack = true; |
| } |
| else |
| { |
| if (nonadminHandle != null) |
| { |
| if (nonadminHandle.Equals("Title")) |
| { |
| dock.DockHandle = DockHandle.TitleBar; |
| } |
| else if (nonadminHandle.Equals("Grip")) |
| { |
| dock.DockHandle = DockHandle.Grip; |
| } |
| else |
| { |
| dock.DockHandle = DockHandle.None; |
| } |
| } |
| else |
| { |
| dock.DockHandle = DockHandle.None; |
| } |
| dock.EnableDrag = false; |
| } |
| dock.DockPositionChanged += new DockPositionChangedEventHandler(dock_DockPositionChanged); |
| return dock; |
| } |
| protected void dock_DockPositionChanged(object sender, DockPositionChangedEventArgs e) |
| { |
| RadDock dd = (RadDock)sender; |
| string guid = dd.ID.Substring(5, dd.ID.Length -(6)); |
| WebCMSTemplate.WidgetHelpers.WidgetHelper.ChangeWidgetZone(guid, int.Parse(e.DockZoneID.Replace("ZoneLayout","")), e.Index); |
| Response.Redirect(Request.Url.ToString()); |
| } |
| public static void ChangeWidgetZone(string widgetid, int zone, int index) |
| { |
| CMSLayerDataContext db = new CMSLayerDataContext(); |
| CMSWidget widget = db.CMSWidgets.First(p => p.widget.Equals(widgetid)); |
| widget.zoneNo = zone; |
| widget.sequence = index; |
| db.SubmitChanges(); |
| } |
Skin
="Office2007"
I am encountering some problems with it. The day navigation buttons (top left of grid) mouse over property does not seem to behave correctly. I have to very very carefully position the mouse at the top of the arrows to get it to change the day when on the demos the click is a simple one right on the arrow itself. Also the popup calendar has lost it's styling.Hello
i can set DIR property for masterview
but i have a colummn that dir property of this column is deferent wiht Other
column
can i set dir for a GridBoundcolumn is a rad grid
Thanks
Davari
| <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:bdConnectionString3 %>"> |
| </asp:SqlDataSource> |
| <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:bdConnectionString3 %>" |
| SelectCommand="select * from MODELES WHERE id_table=@id_table "> |
| <SelectParameters> |
| <asp:Parameter Name="id_table" Type="Int32" /> |
| </SelectParameters> |
| </asp:SqlDataSource> |
| <telerik:RadToolTipManager runat="server" ID="RadToolTipManager1" Position="MiddleRight" |
| OnAjaxUpdate="OnAjaxUpdate" Skin="Web20" ManualClose="true" |
| Height="220px" Width="220px" Animation="Fade" /> |
| <asp:Repeater runat="server" ID="Repeater1" DataSourceID="SqlDataSource1" OnItemDataBound="repeater1_ItemDataBound"> |
| <ItemTemplate> |
| <asp:Image runat="server" ID="ImageBox" ImageUrl='<%# Eval("id_modele", ".../s/{0}_0.jpg") %>' |
| Style="border: solid 1px #ffc6e3;" /> |
| </ItemTemplate> |
| </asp:Repeater> |
| <telerik:RadRotator ID="RadRotator1" DataSourceID="SqlDataSource2" runat="server" Width="328px" Height="120px" |
| ScrollDuration="500" FrameDuration="2000" ItemHeight="118" ItemWidth="108" DataSourceID="SqlDataSource2"> |
| <ItemTemplate> |
| some images |
| </ItemTemplate> |
| </telerik:RadRotator> |
| Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load |
| SqlDataSource1.SelectCommand = "select * from MODELES where annee='2009' and id_cl = '" & Request.QueryString("id_cl") & "'" |
| End Sub |
| Protected Sub repeater1_ItemDataBound(ByVal sender As Object, ByVal e As RepeaterItemEventArgs) |
| If e.Item.ItemType = ListItemType.AlternatingItem OrElse e.Item.ItemType = ListItemType.Item Then |
| Dim ctrl As Control = DirectCast(e.Item.FindControl("ImageBox"), Control) |
| Dim rowView As DataRowView = DirectCast(e.Item.DataItem, DataRowView) |
| If Not [Object].Equals(ctrl, Nothing) Then |
| ctrl.ID = rowView.Row("id_table").ToString() |
| Dim clientID As String = ctrl.ClientID |
| Me.RadToolTipManager1.TargetControls.Add(clientID, rowView.Row("id_table").ToString(), True) |
| End If |
| End If |
| End Sub |
| Protected Sub OnAjaxUpdate(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs) |
| args.UpdatePanel.ContentTemplateContainer.Controls.Add(Me.RadRotator1) |
| SqlDataSource2.SelectParameters("id_table").DefaultValue = args.Value |
| 'Me.RadRotator1.DataBind() |
| End Sub |