| <script type="text/javascript"> |
| Sys.Application.add_load(function() { |
| var editor = $find("<%=RadEditor1.ClientID%>"); |
| editor.set_visible(true); |
| } |
| ); |
| </script> |
1.Add a
RadToolBar underneath the tab strip. Set the Skin property to "WebBlue". Set the Width property to
"70px" and the
Orientation property to Vertical.
2. Open the RadToolBar Smart Tag and select the
Build RadToolBar... option.
3. Add a
RadToolBarDropDown and a RadToolBarSplitButton with text "Edit" and "Print". Set the ImageUrl
properties for these items to "\images\EditInformationHS.png" and "\images\PrintHS.png" respectively.
4. Select the "Edit" item and add three
RadToolBarButton child items with Text "Cut", "Copy" and "Paste". Set
the ImageUrl properties for these items to "\images\CutHS.png", "\images\CopyHS.png" and
"\images\PasteHS.png" respectively.
5. Select the "Print" item and add two RadToolBarButton child items with Text "Print" and "Preview". Set the
ImageUrl properties for these items to "\images\PrintHS.png" and "\images\PreviewHS.png" respectively.
Step 3, The RadToolBarSplitButton, the ImageURL in design time displays a missing icon image, rather than the actual image. I've replaced it with a RadToolBarDropDown and the issue goes away. It does appear correctly at runtime. Is this a bug?
Please keep me posted, thanks!
-Vinny Davi
private void ShowAlert()
{
string script = "<SCRIPT LANGUAGE='JavaScript'> ";
script +=
"alert('HELLO');";
script +=
"</SCRIPT>";
this.RadAjaxPanel1.ResponseScripts.Add(script);
}
function TestWordCount(sender, args)
{
alert('hello world');
if (sender.get_text().search("file://w%7b5/,}") == -1)
{
args.IsValid = false;
}
else
{
args.IsValid = true;
}
Protected Overrides Sub CreateChildControls()
Try
MyBase.CreateChildControls()
Dim imgClear As New Image
Dim pbTrigger As New PostBackTrigger
pbTrigger.ControlID = btnDownload1.ID
'Set up the form for date parameters
pnlDates.ID =
"pnlDate" + Me.ID
lblBeginDate.CssClass =
"form"
lblEndDate.CssClass =
"form"
'Populate the date fields with the default values
txtBeginDate.CssClass =
"content"
txtEndDate.CssClass =
"content"
btnDownload1.ImageUrl =
"/Style Library/images/download1.gif"
btnRetrieve.ImageUrl =
"/Style Library/en-us/custom/retrieve.gif"
imgClear.ImageUrl =
"/Style Library/en-us/custom/clear.gif"
pnlDates.Controls.Add(lblBeginDate)
pnlDates.Controls.Add(txtBeginDate)
pnlDates.Controls.Add(lblEndDate)
pnlDates.Controls.Add(txtEndDate)
pnlDates.Controls.Add(
New LiteralControl("<div class=""subButton""><a href=""javascript:document.forms[0].reset()"">"))
pnlDates.Controls.Add(imgClear)
pnlDates.Controls.Add(
New LiteralControl("</a>"))
pnlDates.Controls.Add(btnDownload1)
pnlDates.Controls.Add(btnRetrieve)
pnlDates.Controls.Add(
New LiteralControl("</div><br /><br />"))
Me.Controls.Add(pnlDates)
'Set up the radgrid properties
oGrid.ID =
"oGrid"
oGrid.EnableEmbeddedSkins =
False
oGrid.Skin =
"NNG"
oGrid.Attributes.Add(
"runat", "server")
oGrid.AutoGenerateColumns =
True
oGrid.ShowHeader =
True
oGrid.PagerStyle.Mode = GridPagerMode.NextPrevAndNumeric
oGrid.PagerStyle.Position = GridPagerPosition.Bottom
' Display the download button if enabled
btnDownload2.ImageUrl =
"/Style Library/images/download2.gif"
pnlExport.ID =
"pnlExport" + Me.ID
pnlExport.Controls.Add(
New LiteralControl("<div class=""subButton"">"))
pnlExport.Controls.Add(btnDownload2)
pnlExport.Controls.Add(
New LiteralControl("</div><br /><br />"))
Me.Controls.Add(pnlExport)
Me.Controls.Add(oGrid)
Catch ex As Exception
Dim ctx As HttpContext = HttpContext.Current
childException = ex
End Try
End Sub
Protected Sub btnDownload_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles btnDownload1.Click, btnDownload2.Click
oGrid.ExportSettings.ExportOnlyData =
False
oGrid.ExportSettings.IgnorePaging =
True
oGrid.ExportSettings.OpenInNewWindow =
True
If fileName.Length > 0 Then
oGrid.ExportSettings.FileName = fileName
End If
oGrid.MasterTableView.ExportToCSV()
End Sub
Private Sub CustomReportingWebPart_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Try
'We need to see if we should display the date forms fields
pnlDates.Visible = useDateParams
'If the date parameters are not visible, then we need to display the export panel, otherwise
' the export button is displayed with the clear and retreive buttons
If useDateParams Then
Me.pnlExport.Visible = False
Else
Me.pnlExport.Visible = True
End If
oGrid.AllowPaging = enablePaging
oGrid.AllowFilteringByColumn = enableFiltering
oGrid.AllowSorting = enableSorting
oGrid.ClientSettings.Scrolling.AllowScroll = enableScrolling
oGrid.ClientSettings.Scrolling.UseStaticHeaders = enableStaticHeaders
oGrid.PageSize = pageSize
oGrid.Width = Unit.Percentage(100)
'Populate the date fields with correct values
lblBeginDate.Text = beginDateLabel +
"<br>"
lblEndDate.Text =
"<br>" + endDateLabel + "<br>"
txtBeginDate.Text = dBeginDate.ToString(
"MM/dd/yyyy")
txtEndDate.Text = dEndDate.ToString(
"MM/dd/yyyy")
'Bind the datasource to get the latest changes
oGrid.DataSource = getDatavalues()
oGrid.DataBind()
Catch ex As Exception
Dim ctx As HttpContext = HttpContext.Current
childException = ex
End Try
End Sub
Any ideas on how to resolve this issue?
Thanks!
DateTime
? dt = Convert.ToDateTime(rtpStartTime.SelectedDate);