private void groupHeaderSection1_ItemDataBinding(object sender, EventArgs e)
{
users = userProcess.getSalaryDetails();
//seriesMapping.ItemMappings.Add(new ItemMapping("Salary", DataPointMember.YValue, ChartAggregateFunction.Sum));
Telerik.Reporting.Processing.
GroupSection GroupHeaderSection = (Telerik.Reporting.Processing.GroupSection)sender;
Telerik.Reporting.Processing.Report report = GroupHeaderSection.Report;
//var group = "jan";
var group = GroupHeaderSection.DataObject["Month"];
string StrExp = null;
StrExp = " Month =' " + group + "' ";
DataTable table = (DataTable)report.DataSource;
DataRow[] rows = table.Select(string.Format("Month", group));
string ChartTitle = null;
string XLable = null;
string YLable = null;
chart1.ChartTitle.Appearance.Position.AlignedPosition = Telerik.Reporting.Charting.Styles.AlignedPositions.Top;
Telerik.Reporting.Processing.Chart HourChart = (Telerik.Reporting.Processing.Chart)GroupHeaderSection.ChildElements.Find("chart1", true)[0];
//Telerik.Reporting.Processing.Chart HourChart = GroupHeaderSection.ChildElements.Find("Chart_Standard_Email_HourlyProd", true)(0);
Telerik.Reporting.
Chart ChartDef = (Telerik.Reporting.Chart)HourChart.ItemDefinition;
ChartDef.Series.Clear();
// DataRow drrow = default(DataRow);
chart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.
ChartValueFormat.General;
chart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Reporting.Charting.Styles.
ChartValueFormat.General;
ChartDef.PlotArea.XAxis.Clear();
ChartDef.PlotArea.XAxis.AutoScale =
false;
XLable =
"Month";
YLable =
"Salary";
chart1.PlotArea.XAxis.AxisLabel.TextBlock.Text = XLable;
chart1.PlotArea.XAxis.AxisLabel.Visible =
true;
chart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = YLable;
chart1.PlotArea.YAxis.AxisLabel.Visible =
true;
 
Telerik.Reporting.Charting.
ChartSeriesItem SeriesItem = new Telerik.Reporting.Charting.ChartSeriesItem();
Telerik.Reporting.Charting.
ChartSeriesItem SeriesItem1 = new Telerik.Reporting.Charting.ChartSeriesItem();
 
 
 
users = userProcess.getSalaryDetails();
foreach (DataRow row in rows)
{
//Telerik.Reporting.Charting.ChartSeriesItem SeriesItem = new Telerik.Reporting.Charting.ChartSeriesItem();
//Telerik.Reporting.Charting.ChartSeriesItem SeriesItem1 = new Telerik.Reporting.Charting.ChartSeriesItem();
SeriesItem.YValue =
Convert.ToDouble(row["Month"]);
ChartSeries.Items.Add(SeriesItem);
ChartSeries.Name =
"Month";
SeriesItem.Label.TextBlock.Appearance.TextProperties.Color = System.Drawing.
Color.Black;
ChartSeries.Appearance.FillStyle.MainColor =
Color.Green;
ChartSeries.Appearance.FillStyle.SecondColor =
Color.Green;
ChartSeries.Type = Telerik.Reporting.Charting.
ChartSeriesType.Bar;
SeriesItem1.YValue =
Convert.ToDouble(row["Salary"]);
ChartSeries1.Items.Add(SeriesItem1);
ChartSeries1.Name =
"Salary";
SeriesItem1.Label.TextBlock.Appearance.TextProperties.Color = System.Drawing.
Color.Black;
ChartSeries1.Appearance.FillStyle.MainColor =
Color.DarkRed;
ChartSeries1.Appearance.FillStyle.SecondColor =
Color.DarkRed;
ChartSeries1.Type = Telerik.Reporting.Charting.
ChartSeriesType.Bar;
}
ChartDef.PlotArea.XAxis.AutoScale =
false;
ChartDef.PlotArea.XAxis.AutoShrink =
false;
chart1.PlotArea.YAxis.AxisMode = Telerik.Reporting.Charting.
ChartYAxisMode.Extended;
ChartDef.Series.AddRange(
new Telerik.Reporting.Charting.ChartSeries[] { ChartSeries });
ChartDef.Series.AddRange(
new Telerik.Reporting.Charting.ChartSeries[] { ChartSeries1 });
}
Hi..
I have to show the PageSize Radcombo text as .... Show "RadCombo" per page.
I need to add a label next to the radcombo in Pagercontentcell.I added a label to Pagercontentcell but it is displaying at the bottom of pager.I have to show this next to radcombo .Please help.
This is my code
protected void grdStock_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)
{
if (e.Item is GridPagerItem)
{
GridPagerItem pagerItem = (GridPagerItem)e.Item;
RadComboBox PageSizeCombo = (RadComboBox)pagerItem.FindControl("PageSizeComboBox");
Label lbPageSize = (Label)e.Item.FindControl("ChangePageSizeLabel");
lbPageSize.Text = "Show";
Label lblPerPage = new Label();
lblPerPage.Text = "per page";
pagerItem.PagerContentCell.Controls.Add(lblPerPage);
}
}
Tiju
AjaxSetting ajaxSetting1 = new AjaxSetting(m_ribbonBar.ID);ajaxSetting1.UpdatedControls.Add(new AjaxUpdatedControl(m_contentPanel.ID, m_loadingPanel.ID) { UpdatePanelHeight = new Unit("100%") });RadAjaxManager1.AjaxSettings.Add(ajaxSetting1);protected override void CreateChildControls(){ base.CreateChildControls(); Button b = new Button(); b.ID = "B"; b.Text = "Search again"; b.Click += new EventHandler(b_Click); Controls.Add(b); m_grid = new RadGrid(); m_grid.ID = "Grid"; m_grid.NeedDataSource += (grid_NeedDataSource); m_grid.AllowPaging = true; m_grid.PageSize = 10; Controls.Add(m_grid); RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(b, m_grid, LoadingPanel); RadAjaxManager.GetCurrent(Page).AjaxSettings.AddAjaxSetting(m_grid, m_grid, LoadingPanel);}DateTime tmpDate;item["Column2"].Controls.Add( new RadDatePicker() { ID = "phDate", SelectedDate = DateTime.TryParse( indExpDate, out tmpDate ) ? (DateTime?)tmpDate : null} );