Hi:
This not a question, but an answer.
<Telerik:GridDateTimeColumn DataField="SampleTime" UniqueName="SampleTimeColumn" HeaderText="Time" HeaderStyle-Width="90px" ItemStyle-Width="86px" DataType="System.DateTime" PickerType="TimePicker"></Telerik:GridDateTimeColumn>The problem is the width of 90px does not allow for the full display of the date-time picker, so in code behind:
WebControl _timeGridControl = _item["SampleTimeColumn"];if (_timeGridControl.Controls.Count > 0){ RadTimePicker _timeTextBox = (RadTimePicker)_timeGridControl.Controls[0]; _timeTextBox.Width = new Unit("80px"); _timeTextBox.DateInput.DisplayDateFormat = "HH:mm";
_timeTextBox.DateInput.DateFormat = "HH:mm";
}Phil

Hi, Everyone,
I’m having some issues with the RAD AjaxManager/Rad AjaxManager Proxy working with the reporting WebForms.ReportViewer that I can’t get around. I’m not sure if this is a Reporting issue or an ASP.Net issue, but I’m going to post here initially.
A little background: I just upgraded both the ASP.Net AJAX and Reporting toolsets from Q3 2012 SP1 to the Q3 2013 version. The scenario I’ll present below has been working with no issues in the Q3 2012 SP1 version and broke after the upgrade.
Basically, I’ve got a master page that has an AJAX Manager control and a content page that has the AjaxManager Proxy. Also on the content page, I’ve got a button and an ASP Panel that has a ReportViewer control and an ASP Label. The AjaxManager Proxy has been configured with AJAX settings for the button, with the ASP Panel identified as the control to be updated. The markup for this is below (this is inside the content page’s ASP Content tag):
<div> <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="RadButton1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="pnlQuoteView" UpdatePanelCss /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManagerProxy> <table border="0" cellpadding="0" cellspacing="0" width="1300" style="border-style: solid; border-width: 1px; margin-left: auto; margin-right: auto; border-color: rgb(223, 233, 245);"> <tr> <td> <telerik:RadButton ID="RadButton1" runat="server" OnClick="RadButton1_Click" Text="RadButton"> </telerik:RadButton> <br /> <asp:Panel ID="pnlQuoteView" runat="server" Width="100%"> <asp:Label ID="lblTest" runat="server"></asp:Label> <telerik:ReportViewer ID="rvQuote" runat="server" ShowDocumentMapButton="False" ShowHistoryButtons="False" ShowParametersButton="False" ShowRefreshButton="False" Width="100%" Height="600px" ViewMode="Interactive" ShowExportGroup="False" ShowPrintButton="False" ProgressText="Generating quote..."></telerik:ReportViewer> </asp:Panel> </td> </tr> </table></div>In the Page Load event for the content page, I’m setting the Visible property of the ReportViewer to false, as I don’t want it to display until the button is clicked. I’m doing the same thing with the Label.
The problem is coming when I try to set the Visible property of the ReportViewer to true in the button click event (see the code below):
protected void Page_Load(object sender, EventArgs e){ this.rvQuote.Visible = false; this.lblTest.Visible = false;}protected void RadButton1_Click(object sender, EventArgs e){ this.lblTest.Visible = true; this.lblTest.Text = "help!"; rvQuote.Visible = true;}
And the following gets written to the machine's Application Event Log for the unhandled exception:
Exception information:
Exception type: ArgumentNullException
Exception message: Value cannot be null.
Parameter name: key
at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
at System.Collections.Generic.Dictionary`2.TryGetValue(TKey key, TValue& value)
at Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetLiteralTraceData(LiteralControl literal, TraceData& data)
at Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.GetTraceData(Object renderedObject)
at Microsoft.VisualStudio.Web.PageInspector.Runtime.WebForms.SelectionMappingRenderTraceListener.EndRendering(TextWriter writer, Object renderedObject)
at System.Web.UI.RenderTraceListener.RenderTraceListenerList.EndRendering(TextWriter writer, Object renderedObject)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.WebControls.CompositeControl.Render(HtmlTextWriter writer)
at Telerik.ReportViewer.WebForms.ReportViewer.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer)
at System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at Telerik.Web.UI.ControlRenderer.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.UpdatePanel.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Control.Render(HtmlTextWriter writer)
at System.Web.UI.UpdatePanel.Render(HtmlTextWriter writer)
at Telerik.Web.UI.OurUpdatePanel.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.PageRequestManager.RenderFormCallback(HtmlTextWriter writer, Control containerControl)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)
at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.HtmlFormWrapper.System.Web.UI.IHtmlForm.RenderControl(HtmlTextWriter writer)
at System.Web.UI.PageRequestManager.RenderPageCallback(HtmlTextWriter writer, Control pageControl)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at Telerik.Web.UI.RadAjaxControl.RenderPageInAjaxMode(HtmlTextWriter writer, Control page)
at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)
at System.Web.UI.Control.RenderChildren(HtmlTextWriter writer)
at System.Web.UI.Page.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
The ReportViewer works fine if it’s made visible on page load, or if a full postback is performed with the button click, instead of using AJAX. At first I thought it may be due to setting visible = false in the page load event, as the viewer isn’t initially rendered to the browser and isn’t in the control tree, but doing the same thing with the Label works fine. The error only happens when changing the Visible property of the ReportViewer. (if I comment out the rvQuote.Visible = true; line, the label is visible and displays the expected text.
So, I’m a little confused and need some direction. I did quite a bit of looking in the forums for something similar to this, but I didn't see anything, hence the post. I feel like there’s probably something simple that I’m missing, just can’t quite figure out what it is…
Thanks in advance for any assistance provided!
Hello!
I'm wondering if there's a way to make the OnFileUploaded or OnClientFileUploaded events fire when the file is placed in the target folder and not on the temp upload.
Would I need to make a custom http handler for this? I don't have a temporary directory set and I have also set DisableChunkUpload to false.
My usage scenario is that I'm trying to fire a SQL job on the upload event which is scanning the target location of the uploader for new files. It isn't working because the event happens during the temp upload so the SQL job is fired before the file is actually in the target upload.
This is what my AsyncUpload declaration looks like:
1.<telerik:RadAsyncUpload ID="RadUpload1" runat="server" RenderMode="Classic" Skin="Bootstrap" AllowedFileExtensions=".xls,.xlsx"2. UploadedFilesRendering="BelowFileInput" OnFileUploaded="IssueUploader_OnFileUpload" PostbackTriggers="btnTest"3. DisableChunkUpload="true" EnablePermissionsCheck="false">4.</telerik:RadAsyncUpload>I have a HTML Chart that works great to plot Line Series data against hourly date/time values in the X axis. I want to shade weekend dates based on the selected date range. So this needs to be done dynamically in code. I suspect that I'm not setting the From/To values correctly. I found one reference that suggested that these should be in OADate format. But this doesn't seem to work. But there may be other issues that I'm not seeing. Here is my code. Any help is greatly appreciated.
Here's the relevant Markup
<telerik:RadHtmlChart runat="server" Width="1000px" Height="300px" BackColor="AntiqueWhite" PlotArea-XAxis-LabelsAppearance-TextStyle-FontSize="9pt" ID="rhcLogsLast24hrs" BorderWidth="1" > <PlotArea> <Series> <telerik:LineSeries DataFieldY="LogParserSuccess" Name="Log Parser" > <TooltipsAppearance Color="White" DataFormatString="{0:n0}"/> <LabelsAppearance Visible="False" DataFormatString="{0:n0}" /> <Appearance FillStyle-BackgroundColor="#5ab7de"> <FillStyle ></FillStyle> </Appearance> <LineAppearance Width="1" /> <MarkersAppearance MarkersType="Circle" BackgroundColor="White" Size="8" BorderColor="#5ab7de" BorderWidth="2"></MarkersAppearance> <TooltipsAppearance Color="White"> <ClientTemplate> #=dataItem.LogParserSuccess# Million Log Events Parsed on<br />#=dataItem.Hour# </ClientTemplate> </TooltipsAppearance> </telerik:LineSeries> </Series> <XAxis DataLabelsField="Hour" > <LabelsAppearance RotationAngle="90" DataFormatString="{0:M/d h tt}"> </LabelsAppearance> <TitleAppearance Text="Hour"> </TitleAppearance> </XAxis> <YAxis> <LabelsAppearance DataFormatString="{0:n0}" > </LabelsAppearance> <TitleAppearance Text="Log Events" > </TitleAppearance> </YAxis> </PlotArea> <Legend > <Appearance Visible="True" Position="Right"> </Appearance> </Legend> <ChartTitle Text="Log Events"> </ChartTitle> </telerik:RadHtmlChart>Here is the relevant Code Behind:
rhcLogsLast24hrs.PlotArea.XAxis.LabelsAppearance.DataFormatString = "{0:M/d h tt}" rhcLogsLast24hrs.PlotArea.XAxis.TitleAppearance.Text = "Hour" rhcLogsLast24hrs.PlotArea.YAxis.TitleAppearance.Text = "Log Events (Millions)" If ts.TotalHours > 24 Then rhcLogsLast24hrs.PlotArea.XAxis.LabelsAppearance.Step = ts.TotalHours / 20 End If Dim I As Integer = 0 For Each dr As DataRow In dt.Rows Dim thisdate As DateTime = dr("Hour") If thisdate.DayOfWeek = DayOfWeek.Saturday Or thisdate.DayOfWeek = DayOfWeek.Sunday Then Dim band As PlotBand = New PlotBand() band.Color = System.Drawing.Color.Green band.Alpha = 190 band.From = thisdate.ToOADate band.To = thisdate.AddHours(1).ToOADate rhcLogsLast24hrs.PlotArea.XAxis.PlotBands.Add(band) End If I += 1 Next rhcLogsLast24hrs.DataSource = dt rhcLogsLast24hrs.DataBind()
Thanks!
my form is pretty wide and the pdf export has data overlapping
gvMonthly.ExportSettings.FileName = GetGridFilename()
gvMonthly.ExportSettings.ExportOnlyData = True
'gvMonthly.ExportSettings.IgnorePaging = True
gvMonthly.ExportSettings.OpenInNewWindow = True
gvMonthly.MasterTableView.ExportToPdf()
is there anything I can do like tell the font to be smaller or have it wrap the text better? or landscape?
Hi..
Here i have two code snipets. In first i used bound column for displaying record in rad grid in runtime.
If i using template column its not working (It throughing an error like Data binding error).
My concept is IF i get the column from database means it should show the Data value Else column should be disappear.
PLEASE HELP ME ON THIS ISSUE... Thanks in advance.
WORKING
------------------------------------------------------
public void Bind_grid()
{
tkgvPerformance.Columns[0].Visible = false;
string Query = "select c.DepartmentID from tblEMP c";
tkgvPerformance.DataSource = Fs.GetDataTable(Query, CommandType.Text);
tkgvPerformance.DataBind();
}
<telerik:RadGrid ID="tkgvPerformance" runat="server" AutoGenerateColumns="False"
GridLines="None" Skin="Sunset" AllowFilteringByColumn="True" AllowSorting="True">
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn DataField="EMPname" HeaderText="CourseName" UniqueName="CourseName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Sub1">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Text='<%#Eval("DepartmentID") %>' ForeColor="Red"
Font-Bold="true" />
<telerik:RadNumericTextBox ID="txtPassMark" runat="server" MaxLength="3" Width="35px">
</telerik:RadNumericTextBox>
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" MaxLength="3" Width="35px">
</telerik:RadNumericTextBox>
<asp:Label ID="Label1" runat="server" Text="100" ForeColor="Gray"></asp:Label>
</ItemTemplate>
<ItemStyle CssClass="style1" />
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
NOTWORKING
------------------------------------------------------
public void Bind_grid()
{
tkgvPerformance.Columns[1].Visible = false;
string Query = "select c.EMPname from tblEMP c";
tkgvPerformance.DataSource = Fs.GetDataTable(Query, CommandType.Text);
tkgvPerformance.DataBind();
}
<telerik:RadGrid ID="tkgvPerformance" runat="server" AutoGenerateColumns="False"
GridLines="None" Skin="Sunset" AllowFilteringByColumn="True" AllowSorting="True">
<HeaderContextMenu EnableImageSprites="True" CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<MasterTableView>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<Columns>
<telerik:GridBoundColumn DataField="EMPname" HeaderText="CourseName" UniqueName="CourseName">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="TemplateColumn" HeaderText="Sub1">
<ItemTemplate>
<asp:CheckBox ID="CheckBox1" runat="server" Text='<%#Eval("DepartmentID") %>' ForeColor="Red"
Font-Bold="true" />
<telerik:RadNumericTextBox ID="txtPassMark" runat="server" MaxLength="3" Width="35px">
</telerik:RadNumericTextBox>
<telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server" MaxLength="3" Width="35px">
</telerik:RadNumericTextBox>
<asp:Label ID="Label1" runat="server" Text="100" ForeColor="Gray"></asp:Label>
</ItemTemplate>
<ItemStyle CssClass="style1" />
</telerik:GridTemplateColumn>
</Columns>
</MasterTableView>
</telerik:RadGrid>
Hi,
First the problem occurs in IE not in Firefox.
I have this string in html view: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
In Firefox it looks like this:
HTML View: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
Switch to design: here
Switch to HTML: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
In IE 11
HTML View: <a href="http://TEST?TestId=<%TEST_GUID%>">here</a>
Switch to design: ">here
Switch to HTML: <a href="http://TEST?TestId=<%TEST_GUID% originalAttribute=" href"="" test?testid='<%TEST_GUID%"'>">here</a>
As you can see editing this in IE alway crashes the hyperlink.
Is there any way to fix this?
I use EditItemTemplate and RadNumericTextBox.
How set default value to 100 into the RadNumericTextBox if the user does not fill in the value?
<telerik:GridTemplateColumn UniqueName="sortid" SortExpression="sortid" HeaderText="Sortering" EditFormHeaderTextFormat="" HeaderStyle-Width="100px"> <ItemTemplate> <asp:Label ID="lblSortid" Text='<%# Eval("sortid") %>' runat="server" /> </ItemTemplate> <EditItemTemplate> <telerik:RadNumericTextBox ID="tbSortid" Width="100px" MaxLength="3" Text='<%# Bind("sortid") %>' EmptyMessage="Sortering (100)" ToolTip="Sortering" runat="server"> <NumberFormat DecimalDigits="0" GroupSeparator="" /> </telerik:RadNumericTextBox> <asp:RequiredFieldValidator ID="rfvSortid" ControlToValidate="tbSortid" Display="Dynamic" ErrorMessage="Sortering (100)?" ForeColor="#FF0000" SetFocusOnError="true" runat="server" /> </EditItemTemplate></telerik:GridTemplateColumn>