I developed a web application that uses RadWindows to display many forms, but because of client resolution problems and the required size of the RadWindow, I needed to create optional pages for some of them. This leads me to my problem.
When the page is viewed in a RadWindow, I have a RadTimePicker that I have overridden the location using the RadCalendarPopup class.
.RadCalendarPopup { left: 50%; margin-left: -32px; position: absolute; top: 0px; }Now, the page will be rendered in a browser window on some occasions, therefore, I need to adjust the top location only when the page is viewed in a browser because a navigation menu is included in the top 50px. Thus, I need to change top to 50px;
One solution I have considered is to have two separate CSS files and simply load them as needed in the code-behind, but it seems overkill to duplicate alot of CSS code just for one rule.
I would use javascript client-side, but I have found that getting the correct wrapper div is quite unreliable.
I will entertain any suggestions.
Dim rgOrderNotes As New RadGrid
rgOrderNotes.ID = "rgOrderNotes"
rgOrderNotes.Style("Position") = "Absolute"
rgOrderNotes.Style("Top") = (150).ToString & "px"
rgOrderNotes.Style("Left") = (50).ToString & "px"
rgOrderNotes.Visible = True
rgOrderNotes.AutoGenerateColumns = False
rgOrderNotes.Height = 500
rgOrderNotes.PageSize = 18
rgOrderNotes.ClientSettings.Scrolling.AllowScroll = True
rgOrderNotes.AllowAutomaticInserts = True
rgOrderNotes.AllowAutomaticUpdates = True
Dim boundColumn As GridBoundColumn
boundColumn = New GridBoundColumn()
boundColumn.DataField = "O5ITEM"
boundColumn.HeaderText = "LINE #"
boundColumn.HeaderStyle.Width = Unit.Pixel(120)
rgOrderNotes.MasterTableView.Columns.Add(boundColumn)
boundColumn = New GridBoundColumn()
boundColumn.DataField = "ODTEXT"
boundColumn.HeaderText = "NOTE DESCRIPTION"
boundColumn.ItemStyle.Font.Name = "Courier New"
boundColumn.DataFormatString = "<pre>{0}</pre>"
boundColumn.HeaderStyle.Width = Unit.Pixel(400)
rgOrderNotes.MasterTableView.Columns.Add(boundColumn)
<telerik:RadButton ID="rbtSamA0" runat="server" ToggleType="Radio" ButtonType="ToggleButton" AutoPostBack="false" GroupName="gnSamA"> <ToggleStates> <telerik:RadButtonToggleState ImageUrl="~/Study/tasks/sam/css/jq_sam_img/samA0.png" /> <telerik:RadButtonToggleState ImageUrl="~/Study/tasks/sam/css/jq_sam_img/samA0-selected.png" Selected="true"/> </ToggleStates></telerik:RadButton>