Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
119 views
I am using line charts.
i am binding list item to chat but its not working correctly.
Am getting 2 datatable , and trying to bind both on 1 chart. but it plotted wrong data.
1 dataset for 1 series and 2nd for another series.

1st Datatable having data as below which we add in 1st list.
Q1 08 150453000
Q2 08 158688000
Q4 08 1515
Q1 09 1000

2nd Datatable having data as below which we add in 2nd list.
Q4 08 2525
Q1 09 2000

1st one series its displaying correct but in 2nd there is no data for Q1 08 and Q2 08 still its plotting line chart from Q1 08  to Q2 08. it should plot from Q4 08 to Q1 09. :(

Below is my code... if somthing is missing then plz let me know.

for(int MainSeries = 0 ; MainSeries < 2 ; MainSeries ++)
{
    DataTable chardata= gettingdata();
CharSeries series = gettingseries here;
List<String> lAxislabel = new List<String> ();

if(chardata!=null)
{
    foreach(DataRaw drv in chardata.Rows)
    {
        //Adding ding values to list
        lAxislabel.Add[drv[Xvalue].Tostring();
        ChartSeriesItem item = new ChartSeriesItem ();
        //Adding values fot chartseriesitem
        item.YValue  = Math.Round(double.Parce(drv[Yvalue].toString(),1);
        series.item.Add(item);
    }
}

if(lAxislabel.count >0 )
{
    ChartAxisitem[] lsXAxis = new ChartAxisitem[lAxislabel.count];
    for(int i=0;i<lAxislabel.count;i++)
    {
        lsXAxis [i] = new ChartAxisitem(lAxislabel[i]);
    }

//objChart is chart object
objChart.Autolayout = true;
objChart.series.Add(series);
objChart.PlotArea.xAxis.AutoScale = false;

if(objChart.PlotArea.xAxis.items.count = 0)
    objchart.PlotArea.xAxis.items.Addrange(lsXAxis );

  objchart.PlotArea.xAxis.LayoutMode = ChartAxisLayoutMode.inside;
  objChart.PlotArea.YAxis.AutoScale = true;

objchart.legend.Apperance.Visible = true.
}

}

Mainseries means 2 seres for which we are geeting data frm 2 different datatable.
may be there are some speeling mistake in above code but ignore thos ebcz am typing this code here only. above code is not cpy pasted from original code. so sorry for tthat and plzzzzzz help me... why 2nd series data is coming wrong :(






Mugdha Aditya
Top achievements
Rank 1
 answered on 03 Oct 2011
1 answer
115 views
Can someone whip up a block confirm sample for drag\drop please?

Like is there no way for you to elegantly do it like the RadButtons implimentation?

function confirmOnDragItem_Dropping(sender, args) {
                var callBackFunction = Function.createDelegate(sender, function (shouldSubmit) {
                    if (shouldSubmit) {
                        //Allow it to happen
                    }
                });
 
                var text = "Are you sure you wish to move this item?";
                radconfirm(text, callBackFunction, 300, 100, null, "RadConfirm");
                args.set_cancel(true);
            }

Does it need the bloated block confirm instead?...I mean I know it probably does, but can you make it easier like the above scenario (in the RadButtons case you call a click method if shouldSubmit.

Daniel
Telerik team
 answered on 03 Oct 2011
1 answer
111 views
Reffering to this thread (http://www.telerik.com/community/forums/aspnet-ajax/grid/header-caption.aspx) I re-ask the question , not sure if you've seen it..

and i re-write main points here:
1) I want to show header caption taken from my datasource (dataset) caption field, grid shows columnName by default
Answer: in this od thread (http://www.telerik.com/community/forums/aspnet-ajax/grid/column-names-are-shown-instead-of-column-captions.aspx)
ok

2) as i click on a row, header captions go back to their colum names.
Answer:on radgrid_itemcommand radgrid.rebind
ok

3) unanswered
I've added a detailTable, it happens now that expanding a row to its child I have this scenario:
itemDataBound fires
(now I check e.Item.OwnerTableView.Name)
1. case is masterTableView -> everything is ok
2. case is detailView -> header captions of the masterTableView are not set (uniqueName is shown)

Really need it.
Thank you

Shinu
Top achievements
Rank 2
 answered on 03 Oct 2011
1 answer
98 views
<telerik:RadPanelBar Height="400PX" runat="server" ID="RadPanelBar1" ExpandMode="FullExpandedItem" 
                    DataFieldID="Id" DataFieldParentID="Padre" DataSourceID="ObjectDataSource1" 
                    DataTextField="Nombre"  Skin="Windows7">
</telerik:RadPanelBar> 

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="cargarMenu" TypeName="PL.Util.cliente">
</asp:ObjectDataSource>





public List<
cliente> cargarMenu()
        {
            List<cliente> misClientes = new List<cliente>();
 
            List<cms_spSeleccionarActivos_Result> resultadoActivos = listarActivos();
            List<cms_spSeleccionarInactivos_Result> resultadoInactivos = listarInactivos();
            cliente clienteActivo = new cliente(1, 0, "Activos");
            cliente clienteInactivo = new cliente(2, 0, "Inactivos");
            misClientes.Add(clienteActivo);
            misClientes.Add(clienteInactivo);
            foreach (cms_spSeleccionarActivos_Result item in resultadoActivos)
            {
                cliente miCliente = new cliente(item.cmr_id, Convert.ToInt32(item.ecm_id), item.cmr_nombre);
                 
                misClientes.Add(miCliente);
            }
 
 
            foreach (cms_spSeleccionarInactivos_Result item in resultadoInactivos)
            {
                cliente miCliente = new cliente(item.cmr_id, Convert.ToInt32(item.ecm_id), item.cmr_nombre);
                
                misClientes.Add(miCliente);
            }
            return misClientes;
        }
There's any way to load about 20,000 records into a RadPanelBar efficiently,my problem is that the application becomes very slow .


Kate
Telerik team
 answered on 03 Oct 2011
4 answers
136 views
I have a screen in my application that has a multi-select RadComboBox which posts to a second application passing screen inputs as parameters.  In the past the control would pass the text parameter as a comma delimited string to the second application with the selections (ie. 123, 321, 223, 112).  After upgrading to 2011.2.915.35 this behavior has changed and now after more than 3 items are select the text is switching to "4 Items Selected".  In addition, my customer has asked to have the list display so they can directly edit the choices.  So, is there a property I can set to achieve the old behavior showing the comma delimited choices regardless the number of selected items?

Thanks,
Shane
Simon
Telerik team
 answered on 03 Oct 2011
8 answers
307 views

I have a ContentAreaCssFile that contains the following CSS:

body  
{  
    font-family:Verdana;  
    font-size:10px;  

And on the Page Load event, I have the following code:

    var contentArea  =  editor.get_ContentArea();  
    if (contentArea != null)  
    {  
        contentArea.style.fontFamily = "Verdana";  
        contentArea.style.fontSize = "10px";  
    }  
 

In IE 7, when the user clicks in the body of the Editor, the Font Name and Font Size get correctly set to "Verdana" and "10px".

However, in Firefox 2.0, then FontName never gets set. After clicking in the editor, it still says "FontName".  Is this a Bug?   Is there a work-around?
Rumen
Telerik team
 answered on 03 Oct 2011
1 answer
49 views
Hi,

In our application a resource can only have one reservation at one moment/time-slot.

Is it possible to get more valuable space (especially for the WeekView), by hiding the insert area for the DayView and WeekView, like the TimelineView.ShowInsertArea?

Cheers
Jani
Plamen
Telerik team
 answered on 03 Oct 2011
2 answers
168 views
Hello Support

I have an radgrid in which I have enable filter option on one column. And in filter textbox as RadNumericTextbox, every thing works fine but the Radnumerictextbox background color is always black which I want to make it White but it doesn't happens. Following code I have tried

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
    {
        if (e.Item is GridFilteringItem)
        {
            GridFilteringItem filterItem = e.Item as GridFilteringItem;
            RadNumericTextBox txtNumber = (RadNumericTextBox)filterItem["S1"].Controls[0];
            txtNumber.BackColor = System.Drawing.Color.White;
        }
    }

Please check and tell me what made it wrong...

Regards

ASIF
Asif
Top achievements
Rank 1
 answered on 03 Oct 2011
1 answer
79 views
Hi,

When i darg and drop RadGrid from tollbox ,it is showing the dafult colums(Design time),

I don't want to see the default colums at design time inside the grid,

Is there any option avilable to turn of these default settings.

Please check the attached screen shot.

Regards
Kishore
Shinu
Top achievements
Rank 2
 answered on 03 Oct 2011
3 answers
170 views

I'm still conflicted about how to load the advanced form and prepopulate custom controls on an existing appointment.

Currently my GetAppointments method will return a collection of Telerik Appointments which the scheduler can easily understand and render.
When I go to edit an existing appointment, I need to bind data to custom controls that the appointment class does not have.
I'm still not certain how this is acheived.

I've toyed with creating my own appointment class that derives from the telerik one but the web service provider method I am using will only allow implementing methods that use the telerik appointment.

The thing that I am missing is what happens when a user clicks on the existing appointment.
 Where does my custom data will come from?
I have the ID of my appointment in the telrik appointment object. Am I to make a DB call to get the extra info?

Here's an example of my provider.Get method. This method returns the appointments to the scheduler.

                List<Appointment> appointmentsList = new List<Appointment>();  
                List<MySpecificAppointment> appts = new List<MySpecificAppointment>();  
 
                using (AppointmentFacade af = new AppointmentFacade())  
                {  
                    appts = ocsf.GetSecureAppointments(HttpContext.Current.User.Identity.Name); //gets appts for user  
                }  
 
                foreach (var apt in appts)  
                {  
                    Telerik.Web.UI.Appointment appointment = new Appointment();  
                    appointment.Start = apt.Start;  
                    appointment.End = apt.End;  
                    appointment.Description = apt.Description;  
                    appointment.Subject = apt.Subject;  
                    appointment.RecurrenceState = apt.RecurrenceState;  
                    appointment.RecurrenceRule = apt.RecurrenceDescription;  
                    appointment.RecurrenceParentID = apt.RecurrenceParentID;  
                    appointment.ID = apt.Id;  
                    appointmentsList.Add(appointment);  
                } 

I can fill the telrik appointment with common objects but anything specififc to MySpecififcAppointment is lost. When a user goes to edit the existing appointment, when the advanced form is loaded only Telerik.Appointment properties will be properly prepopulated.

Any help would be fantastic. Cheers.

Peter
Telerik team
 answered on 03 Oct 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?