Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
107 views
Hi...all

I am using Radgrid.In one of column in i have drodown.Depeding on the selection in the dropdown ,the values in other column(I used text box inside the column to dispaly integer values ,these integer values change  with drop down selection).I want to find the sum of integer ,as soosn as the values in the text box are changed.how to do it.

Thanks
Prencia
Andrey
Telerik team
 answered on 06 Dec 2011
5 answers
135 views
My boss wants to do recurrence handling his way which is having an actual DB entry for each appointment. And they are being grouped by some common field in the DB. When those appointments are loaded I check for that field and if it's not 0 then I know that this is a recurrent appointment so in AppointmentDataBound event i do the following:

If row.Item(10) = 0 Then
    e.Appointment.RecurrenceState = RecurrenceState.NotRecurring
Else
    e.Appointment.RecurrenceState = RecurrenceState.Occurrence
End If

But when I click on the delete icon the OccurrenceDelete event does not fire. What should I do to fix it? Thanks


Peter
Telerik team
 answered on 06 Dec 2011
1 answer
251 views
Hi,

I have a requirement from our clients. They would like to have up and down buttons ( like you have in list box) to move items up and down in a Rad Grid. They don'T want to use drag and drop functionality already provided with the Rad Grid. Is there a way that I can achieve this with Grid?


Thanks
Andrey
Telerik team
 answered on 06 Dec 2011
0 answers
97 views
Hi Friends,

Here is my scenario,

I have one .aspx page which have one user control and this usercontrol have one RadListView whose itemtemplate is one usercontrol in which we have one label and RadComboBox [RadComboBox creted dynamically in code behind].

I need to gets all the ComboBox inside RadListView using javascript/jQuery.

Please guide me.

Thanks,
Jawahar
jawahar
Top achievements
Rank 1
 asked on 06 Dec 2011
2 answers
359 views
I am building a webpage that just contains a Radtoolbar. When loaded it will be passed QueryString parameters. I would like to pass those parameters in the NavigateUrl property, but how?

Thanks
 
Kate
Telerik team
 answered on 06 Dec 2011
1 answer
81 views
Hi,

  Can you please give me some demo links to implement Rad scheduler in MVC 3.0

Thanks,
Maddela
Nikolay Tsenkov
Telerik team
 answered on 06 Dec 2011
1 answer
127 views
Hi
currently i'm designing reports using Telerik Reporting in layered architecture.every method  related to this  report returns List collections.
But I'm using Datatables in reports,so that i encounterd this error ,
Unable to cast object of type 'System.Collections.Generic.List`1[LAEMIV3.Business.Entities._00001.User]' to type 'System.Data.DataTable'.
can u give me a sample for how to design a chart using grouping in telerik reporting.

 

 

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 });

 

}

Steve
Telerik team
 answered on 06 Dec 2011
1 answer
93 views

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

Tiju
Top achievements
Rank 1
 answered on 06 Dec 2011
2 answers
385 views
Hi,

I have a page containing a ribbon bar and a content control (div).
I added AjaxSettings for this (in CreateChildControls):
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);

The control for the content div is dynamically created (dependent on the button I clicked in the ribbon bar).
So far, this works. While the control is dynamically loaded and added to the content div, the content div shows the loading panel.

Now I built a control containing a radgrid and a button for testing purposes:
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);
}

The loading panel is the same as the one from the main page (if I don't use a loading panel here, I get the error too).
When the control is dynamically created the first time, everything is ok. The div shows the loading panel until the control is ready. When I click the button, m_radGrid.Rebind() is called and the RadGrid shows a loading panel.
But when another dynamically created control is added to the content div (I call m_contentPanel.Clear() first), I get a loading panel and this exception (right after I added the grid to the ajaxsettings):

Exception type: InvalidOperationException 
    Exception message: Collection was modified; enumeration operation may not execute
   at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
   at Telerik.Web.UI.RadAjaxControl.OnPagePreRender(Object sender, EventArgs e)
   at System.EventHandler.Invoke(Object sender, EventArgs e)
   at System.Web.UI.Control.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

What is the correct way to add dynamically created controls to the AjaxSettings so that my case will work?

Thanks!
JP
Top achievements
Rank 1
 answered on 06 Dec 2011
3 answers
615 views
I have a NumericTextBox that is set to type=percentage, inside of a FormView for databinding. The database stores the percentage field as a decimal number less than or equal to one (0.00 to 1.00). I'd like the user interact with a range between 0 and 100, which is just the database value times 100. I'd also like to keep the databinding as simple as possible, and it needs to be two-way (I know <%# Eval("pct") * 100 %> would work for reading, but I wouldn't be able to save it back to the database). I know there are other solutions, like indirection or manually binding that, but is there any setting existing or planned that can essentially do this translation for the front end?

So that, any time I programmtically reference the field, it is (for example) 0.03, but when the users sees it, it would be 3 %, and they would change it by typing in  "4 %". Is this possible? Anybody found any creative solutions?

Thanks, Matthew
Vasil
Telerik team
 answered on 06 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?