or
function Chart_Line_Count_SeriesClicked(sender,args)
{
if (args.get_seriesName() != "DaysL") $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(args.get_category());
}
Then through the RadAjaxManager1 configuration I associated the RadAjaxManager1 with the Chart_Line_Count Object.
Then in the code behind file:
Protected Sub RadAjaxManager1_AjaxRequest(sender As Object, e As AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
'test to clear datasource and blank out the chart
Chart_Line_Count.DataSource = ""
Chart_Line_Count.DataSourceID = ""
End Sub
But it doesn't work. Can anyone tell me why? I see the AJAX circular spinning refresh thing fire, but nothing happens. Please let me know if you need any more information.
I have a situation that I wonder if anyone can suggest or point me to a solution that solves my problem.
I want to display the radcombobox so the user can select a date, which will return a set of records from a database.
The problem is that the grid does have any datasource until then and therefore does not display.
The combobox is in a commanditem template and does not display. Would it be better to load the grid with dummy records(all zeros and nulls) or is there a better solution.
I just need to display the radcombobox. Any suggestions will be appreciated. The HTML is below.
<telerik:RadGrid ID="TimesheetGrid" runat="server" AutoGenerateColumns="false" EnableLinqExpressions="false" GridLines="None"> <MasterTableView CommandItemDisplay="Top" AllowPaging="false" PageSize="15"> <EditFormSettings> <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn> </EditFormSettings> <CommandItemTemplate> <table> <tr> <td style="width:10%"> <telerik:RadComboBox ID="cboPayPeriod" runat="server" AutoPostBack="true" OnSelectedIndexChanged="cboPayPeriod_SelectedIndexChanged"></telerik:RadComboBox> </td> <td style="width:40%"> <asp:LinkButton ID="cmdInsert" runat="server" CommandName="InitInsert" Font-Underline="True" ForeColor="White">Insert New Timesheets Record</asp:LinkButton> </td> <td style="width:30%"> <asp:LinkButton ID="cmdUpdateAll" runat="server" CommandName="UpdateEdited" Font-Underline="True" ForeColor="White">Update Timesheet</asp:LinkButton> </td> </tr> </table> </CommandItemTemplate> <CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings> <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn> <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn> <Columns> <telerik:GridDateTimeColumn DataField="WorkDate" HeaderText="Work Date" UniqueName="WorkDate" DataFormatString="{0:MM/dd/yy}" HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" AllowFiltering="false"> </telerik:GridDateTimeColumn> <telerik:GridBoundColumn DataField="Shift" HeaderText="Shift" ItemStyle-Width="25px" HeaderStyle-Width="25px" AllowFiltering="False"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Reg" HeaderText="Reg" ItemStyle-Width="35px" AllowSorting="True" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ShftHrs" HeaderText="Shift Hrs" ItemStyle-Width="35px" AllowSorting="True" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="OT" HeaderText="OT" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Vac36" HeaderText="Vac 36 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Vac40" HeaderText="Vac 40 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Vac48" HeaderText="Vac 48 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Sick36" HeaderText="Sick 36 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Sick40" HeaderText="Sick 40 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Sick48" HeaderText="Sick 48 Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Exc_Absence" HeaderText="Exc Abs Hrs" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Holiday_Worked" HeaderText="Holiday Worked" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Holiday_Not_Worked" HeaderText="Holiday Not Worked" ItemStyle-Width="35px" AllowFiltering="False" DataFormatString="{0:##.0}"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Comments" HeaderText="Comment" ItemStyle-Width="135px" AllowFiltering="False"></telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="Additional_Comment" HeaderText="Additional Comment" ItemStyle-Width="135px" AllowFiltering="False"></telerik:GridBoundColumn> <telerik:GridTemplateColumn DataField="Five" HeaderText="5%" AllowFiltering="false"> <ItemTemplate> <asp:CheckBox ID="chkFive" runat="server" Checked='<%#Bind("Five")%>' /> </ItemTemplate> </telerik:GridTemplateColumn> <telerik:GridTemplateColumn DataField="Ten" HeaderText="10%" AllowFiltering="false"> <ItemTemplate> <asp:CheckBox ID="chkTen" runat="server" Checked='<%#Bind("Ten")%>' /> </ItemTemplate> </telerik:GridTemplateColumn> </Columns> </MasterTableView> </telerik:RadGrid><telerik:RadCodeBlock runat="server" ID="MainScriptBlock"> <script type="text/javascript"> window.$ = $telerik.$; jQuery.event.add(window, "load", resize); jQuery.event.add(window, "resize", resize); function resize() { var h = $(window).height(); $(".resizeGrid").css({ 'height': (h - 60) }); } </script> </telerik:RadCodeBlock>
An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.
|
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="GrabberMonitorGrid"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="StatisticsGrid"></telerik:AjaxUpdatedControl> <telerik:AjaxUpdatedControl ControlID="RadChart2"></telerik:AjaxUpdatedControl> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings></telerik:RadAjaxManager><telerik:RadChart runat="server" Width="945" ID="RadChart2" Skin="LightBrown" Visible="false"> <Appearance> <FillStyle MainColor="240, 237, 225"></FillStyle> <Border Color="209, 197, 175"></Border> </Appearance> <Series> <telerik:ChartSeries Name="Resieved Query" Type="SplineArea"> <Appearance> <FillStyle FillType="ComplexGradient" MainColor="243, 206, 119"> <FillSettings> <ComplexGradient> <telerik:GradientElement Color="243, 206, 119" /> <telerik:GradientElement Color="236, 190, 82" Position="0.5" /> <telerik:GradientElement Color="210, 157, 44" Position="1" /> </ComplexGradient> </FillSettings> </FillStyle> <TextAppearance TextProperties-Color="112, 93, 56"> </TextAppearance> <Border Color="223, 170, 40" /> </Appearance> <Items> <telerik:ChartSeriesItem YValue="1.2" XValue="0"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="3.2" XValue="1"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="2.2" XValue="2"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="5.2" XValue="3"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="4.2" XValue="4"> </telerik:ChartSeriesItem> </Items> </telerik:ChartSeries> <telerik:ChartSeries Name="Recaived Result" Type="SplineArea"> <Appearance> <FillStyle FillType="ComplexGradient" MainColor="154, 220, 230"> <FillSettings> <ComplexGradient> <telerik:GradientElement Color="154, 220, 230" /> <telerik:GradientElement Color="121, 207, 220" Position="0.5" /> <telerik:GradientElement Color="89, 185, 204" Position="1" /> </ComplexGradient> </FillSettings> </FillStyle> <TextAppearance TextProperties-Color="112, 93, 56"> </TextAppearance> <Border Color="117, 177, 192" /> </Appearance> <Items> <telerik:ChartSeriesItem YValue="1.1" XValue="0"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="3.1" XValue="1"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="2.1" XValue="2"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="5.1" XValue="3"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="4.1" XValue="4"> </telerik:ChartSeriesItem> </Items> </telerik:ChartSeries> <telerik:ChartSeries Name="Send Order" Type="SplineArea"> <Appearance> <FillStyle FillType="ComplexGradient" MainColor="161, 218, 123"> <FillSettings> <ComplexGradient> <telerik:GradientElement Color="161, 218, 123" /> <telerik:GradientElement Color="130, 202, 82" Position="0.5" /> <telerik:GradientElement Color="104, 179, 48" Position="1" /> </ComplexGradient> </FillSettings> </FillStyle> <TextAppearance TextProperties-Color="112, 93, 56"> </TextAppearance> <Border Color="81, 162, 37" /> </Appearance> <Items> <telerik:ChartSeriesItem YValue="1" XValue="0"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="3" XValue="1"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="2" XValue="2"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="5" XValue="3"> </telerik:ChartSeriesItem> <telerik:ChartSeriesItem YValue="4" XValue="4"> </telerik:ChartSeriesItem> </Items> </telerik:ChartSeries> </Series> <Legend> <Appearance Corners="Round, Round, Round, Round, 6"> <ItemTextAppearance TextProperties-Color="113, 94, 57"></ItemTextAppearance> <Border Color="225, 217, 201"></Border> </Appearance> </Legend> <PlotArea> <XAxis LayoutMode="Normal" AutoScale="False" MaxValue="4" Step="1"> <Appearance Color="226, 218, 202" MajorTick-Color="216, 207, 190"> <MajorGridLines Color="226, 218, 202"></MajorGridLines> <TextAppearance TextProperties-Color="112, 93, 56"></TextAppearance> </Appearance> <AxisLabel> <TextBlock> <Appearance TextProperties-Color="112, 93, 56"></Appearance> </TextBlock> </AxisLabel> <Items> <telerik:ChartAxisItem Value="1"></telerik:ChartAxisItem> <telerik:ChartAxisItem Value="2"></telerik:ChartAxisItem> <telerik:ChartAxisItem Value="3"></telerik:ChartAxisItem> <telerik:ChartAxisItem Value="4"></telerik:ChartAxisItem> </Items> </XAxis> <YAxis> <Appearance Color="226, 218, 202" MinorTick-Color="226, 218, 202" MajorTick-Color="226, 218, 202"> <MajorGridLines Color="231, 225, 212"></MajorGridLines> <MinorGridLines Color="231, 225, 212"></MinorGridLines> <TextAppearance TextProperties-Color="112, 93, 56"></TextAppearance> </Appearance> <AxisLabel> <TextBlock> <Appearance TextProperties-Color="112, 93, 56"></Appearance> </TextBlock> </AxisLabel> </YAxis> <Appearance Dimensions-Margins="18%, 23%, 12%, 10%"> <FillStyle MainColor="254, 255, 228" SecondColor="Transparent"></FillStyle> <Border Color="226, 218, 202"></Border> </Appearance> </PlotArea> <ChartTitle> <Appearance> <FillStyle MainColor=""></FillStyle> </Appearance> <TextBlock Text="Intelligent Labels - On"> <Appearance TextProperties-Color="127, 85, 51"></Appearance> </TextBlock> </ChartTitle></telerik:RadChart><telerik:RadGrid ID="GrabberMonitorGrid" runat="server" OnDetailTableDataBind="InstrumentGrid_DatdataBind" AutoGenerateColumns="False" AllowMultiRowSelection="false" AllowSorting="True" OnItemCommand="RadGrid1_ItemCommand" ClientSettings-EnablePostBackOnRowClick="true" CellSpacing="1" Skin="Office2010Silver"><telerik:RadGrid ID="StatisticsGrid" runat="server" AllowSorting="True" EnableLinqExpressions="False" MasterTableView-ShowHeadersWhenNoRecords="true" OnDetailTableDataBind="StatisticsGrid_DatdataBind" Skin="Office2010Silver" CellSpacing="0" GridLines="None"> <ClientSettings AllowKeyboardNavigation="false" Resizing-AllowColumnResize="True"> <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="80%" /> </ClientSettings>#region Create chart series collection RadChart2.Chart.Series.Clear(); for (int i = 0; i < interpolatedCounters.Length; i++) { InstrumentCountersUnit currentUnit = interpolatedCounters[i]; foreach (string receivedCounterName in currentUnit.Received.Keys) { Telerik.Charting.ChartSeries singleSeries = new ChartSeries(receivedCounterName, ChartSeriesType.SplineArea); singleSeries.Name = "Recieved " + receivedCounterName; SortedList<DateTime, int> counterValues = currentUnit.Received[receivedCounterName]; for (int j = 0; j < counterValues.Count; j++) { DateTime currentValueDate = counterValues.Keys[j]; int currentValueCounter = counterValues[currentValueDate]; ChartSeriesItem seriesItem = new ChartSeriesItem(currentValueCounter, currentValueDate.Minute); singleSeries.AddItem(seriesItem); } RadChart2.Chart.Series.Add(singleSeries); } foreach (string sentCounterName in currentUnit.Sent.Keys) { Telerik.Charting.ChartSeries singleSeries = new ChartSeries(sentCounterName, ChartSeriesType.SplineArea); singleSeries.Name = "Sent " + sentCounterName; SortedList<DateTime, int> counterValues = currentUnit.Sent[sentCounterName]; for (int j = 0; j < counterValues.Count; j++) { DateTime currentValueDate = counterValues.Keys[j]; int currentValueCounter = counterValues[currentValueDate]; ChartSeriesItem seriesItem = new ChartSeriesItem(currentValueCounter, currentValueDate.Minute); singleSeries.AddItem(seriesItem); } RadChart2.Chart.Series.Add(singleSeries); } RadChart2.ChartTitle.TextBlock.Text = Name; RadChart2.Visible = true; } #endregion