Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
225 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
76 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
331 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
68 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
110 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
76 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
355 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
569 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
5 answers
214 views
I'm trying to get a RadDatePicker to properly postback on my RadGrid.  I'm creating the object dynamically since depending on the row type, I want different types of controls in the column.

To start, inside ItemCreated, I'm doing this to create the control:
DateTime tmpDate;
item["Column2"].Controls.Add( new RadDatePicker() {
    ID = "phDate",
    SelectedDate = DateTime.TryParse( indExpDate, out tmpDate ) ? (DateTime?)tmpDate : null
} );
In this code, indExpDate is set to either my data (if the item.DataItem is available) or to "" (if not).

This is the same code that I'm using to create my TextBox objects as well, which are working fine.

The control is properly created initially, showing the date that I want.  When I post back in an ItemCommand, the SelectedDate is always NULL, and when the page redraws following the postback, the field is blank.  This only happens if I don't change the control value - once I change the control value, all is well.

As I said, TextBox works fine.  I create the control the same way, set the .Text property, can read the data during ItemCommand, and the value comes back when the postback completes.  RadDatePicker is the only one that I'm having trouble with.

Any ideas?

Thanks - Matt
Mira
Telerik team
 answered on 06 Dec 2011
3 answers
179 views
Everything is fine in IE and Firefox. However, the alignment for RadNumericTextBox is not working properly in Chrome. It was fine when I last checked it. I noticed it today at work when was refactoring some code. Even the demo pages are not working properly. 

Here is how you can reproduce it.
1) Go to:  http://demos.telerik.com/aspnet-ajax/input/examples/radnumerictextbox/firstlook/defaultcs.aspx
2) Now click on the spin buttons of any rad window and see the alignment. 

Galin
Telerik team
 answered on 06 Dec 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?