Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
104 views
Hi,

I have a set of 3 line series on my chart which is databound using a datatable. This works well and I have the 3 line series displayed as expected. 

What I'm trying to do now is to introduce new columns in my datatable which will inform if a given point in a series is special, in which case I want to highlight it (i.e. change the color of that point). I was thinking I can achieve this by adjusting the color while looping through SeriesItems. However, SeriesItems is empty.

Right after binding, I inspect the series and I see 3 series as expected. But when I inspect the SeriesItems (or Items), they are empty.

Both object below are empty after binding, yet the chart displays fine.
Chart.PlotArea.Series[0].Items

(Chart.PlotArea.Series[0] as LineSeries).SeriesItems

Any ideas?

Thanks,
A

Danail Vasilev
Telerik team
 answered on 07 Jan 2015
1 answer
196 views
Hi,
I have a radgrid with checkbox(Template columns) column. By default the checkboxes are selected (written in Itemdatabound) and row is in green color. If the user deselects the checkbox then the row should be in default color.
I wrote the following javascript for checkbox click event.

function GridCheckboxChecked(obj1, rowid) {
                    
                    //ensure that the outer grid dataItem are generated
                    var grid = $find("<%= rgReceivers.ClientID %>");
                    grid.get_masterTableView().get_dataItems();

                    var griditem = $find(rowid);
                    griditem.set_selected(obj1.checked);
                    var girdrow = $('#' + rowid)[0];

                    if (obj1.checked) {
                       
                        $(girdrow).removeAttr("style");
                        $(girdrow).attr("style", "background-color:#C9F1C9");
                    }
                    else {
                        $(girdrow).removeAttr("style");
                    }
                }


It works fine. But if any other ajax request is performed in the screen, all the rows are coming back in Green color again.

I found that there is no method available to track the client side changes for radgrid.
So I reapplied the changes in the radgrid when ajax postback. For that I wrote the following in document.ready function

$(document).ready(function () {
                   
                    var grid = $find("<%= rgReceivers.ClientID %>");
                    console.log(grid);
                    
                    if (grid != null) {
                        var dataItems = grid.get_masterTableView().get_dataItems();

                        for (var i = 0; i < dataItems.length; i++) {
                           // re apply the changes
                        }
                    }
                });

When the page loaded first , it founds the grid object. But for the proceeding ajax calls, the grid object is showing as null.

Following are my ajax settings (applied on page load event)
    
      RadAjaxManager mgr = RadAjaxManager.GetCurrent(Page);
        mgr.AjaxSettings.Clear();
        mgr.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(mgr_AjaxRequest);
        mgr.AjaxSettings.AddAjaxSetting(mgr, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(btnsendbox, rgReceivers, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(btnsendbox, pnlContent);
        mgr.AjaxSettings.AddAjaxSetting(rgReceivers, pnlContent);
        mgr.AjaxSettings.AddAjaxSetting(rgReceivers, rgReceivers, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(btnClear, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(btnSave, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(chkCBN, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(cmbRecalNos, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));
        mgr.AjaxSettings.AddAjaxSetting(chkAll, pnlContent, (RadAjaxLoadingPanel)(this.Page.Master as MasterPage).FindControl("RadAjaxLoadingPanel2"));


Why the grid object is showing as null for the ajax postbacks even though it is on the page. How to find the radgrid on ajax postbacks?
Konstantin Dikov
Telerik team
 answered on 07 Jan 2015
1 answer
166 views
I have a RadGrid control inside a RadAjaxPanel. In my jquery code, I make an ajax request to add a new record to RadGrid. It's added sucessfuly. However, it doesn't show up on the page even though I update RadAjaxPanel through the code below.

var panel = <%= ajaxPanel.ClientID %>; 
panel.ajaxRequest('<%= ajaxPanel.UniqueID %>','');

I see that RadAjaxPanel is updated but new record isn't there.I have to refresh the whole page to have the new record show up. Is there any way to do it without refresh?
Maria Ilieva
Telerik team
 answered on 07 Jan 2015
1 answer
77 views
Hi,

Is there any method to persist the client side changes after ajax like .trackChanges() and .commitChanges() for combobox?
Konstantin Dikov
Telerik team
 answered on 07 Jan 2015
6 answers
172 views
      As the form is in ContentPlaceHolder of ContentPlage I ikplement the logic like this........     


      ContentPlaceHolder contentPage = Page.Master.FindControl("ContentPlaceHolder2") as ContentPlaceHolder;
            RadButton radbutton1 = (RadButton)contentPage.FindControl("RadButton1"); 


after this the result in radbutton1  is null as it doesnt find the control RadButton1....

please help me in this
Gopi
Top achievements
Rank 2
 answered on 07 Jan 2015
2 answers
74 views
Hi
I am new to using Scheduler with Group By resources. I have created the page with all the necessary data. But the Scheduler displays multiple entries for the resources. 

You can see my multiple appointments  for resource Mary, though there is only one entry in the database
My Server side code as follows:

    Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
        If Not IsPostBack Then
            'Dim ParamCol = New ParameterCollection
            'ParamCol.Add("Date", Now)
            Dim ds As DataSet = zDataFactory.GetAppointmentListAll()
            RadScheduler1.SelectedDate = Convert.ToDateTime(Now)
            RadScheduler1.SelectedView = SchedulerViewType.DayView
            RadScheduler1.TimelineView.NumberOfSlots = 10
            RadScheduler1.DataSource = ds
            RadScheduler1.DataKeyField = "AppointmentID"
            RadScheduler1.DataStartField = "FromTime"
            RadScheduler1.DataEndField = "ToTime"
            RadScheduler1.DataSubjectField = "ServiceDescription"
            RadScheduler1.GroupBy = "Consultant"
            RadScheduler1.GroupingDirection = GroupingDirection.Horizontal
            
            Dim rt As New ResourceType("Consultants")
            rt.ForeignKeyField = "ConsultantID"
            rt.KeyField = "ConsultantID"
            rt.TextField = "ConsultantName"
            rt.Name = "Consultant"
            rt.AllowMultipleValues = False
            rt.DataSource =zDataFactory.GetConsultantList()
            RadScheduler1.ResourceTypes.Add(rt)

         End If
    End Sub

The data this is returned by the zDataFactory.GetAppointmentListAll()

Where it is going wrong?

Shanmugam Narasimhan
Top achievements
Rank 1
 answered on 07 Jan 2015
2 answers
117 views
I am looking to place a radbutton which will open a radWindow from the marker tooltip. I cannot seem to get this to work.

I am setting the tooltip from the code behind which works great except for this one thing. The radbutton will not even show up. I can use a basic HTML <a href> tag and that will show up but no server controls.
 
 the following shows the code that I am using
TEMPLATE = TEMPLATE + "<button type=\"button\" onclick=\"function openRWdrillDown(){ alert('test test');}\" name=\"" + city + "\">View Details</button>";


                //<telerik:RadButton ID=\"btnDetails\" runat=\"server\" OnClientClicked=\"openRWdrillDown\" CommandArgument=\"" + city.Replace(' ', '@') + "\" Text=\"View Details\" ButtonType=\"LinkButton\" />
                mark.TooltipSettings.Content = TEMPLATE;

any guide as to how to get this to work either JavaScript or server side.

Danail Vasilev
Telerik team
 answered on 06 Jan 2015
2 answers
109 views
Hi,

I have a site using splitters and multiple radpanes. One of those radpane contains a graph reports. After a user logins, we have javascript that resizes the radpane that contains the report based on the actual size of the report (a multipage). The radpane in question is nested inside a splitter.
Now it all works most of the time but occasionally we get null when we try to get the radpane object. This is the code below:

var reportpane = $find("<%= RadPaneReporting.ClientID %>");

We noticed it happens on IE9. We have tried it on IE8, and IE11 and there seems to be no issue. FYI, we are using version 2011.3.1115.35 of the Telerik controls.

Hope you guys can shed some light on this strange issue.
Thanks.

Ricky.
Vessy
Telerik team
 answered on 06 Jan 2015
1 answer
95 views
I have a RadPanelBar.
I want to add RadPanelItem with Item template and into this Item template I want to add other controls (checkboxes and etc..)
This is my javascript function :

function AddRadPanelItem
{
      var panelBar = $find("<%= pbMain.ClientID %>");
      var panelItem = new Telerik.Web.UI.RadPanelItem();
      panelItem.set_text("FIRST PANEL ");

     //here I want to add Item template and my other controls in panelItem ?

      panelBar.trackChanges();
      panelBar.get_items().add(panelItem);
      panelBar.commitChanges();    

}


Ivan Danchev
Telerik team
 answered on 06 Jan 2015
6 answers
222 views
Hello

  I am using RadGrid in our application, i am having issue with the Pager Style it is not align to the Right, it is defaulting to the left. I am using the latest Telerik.Web.UI.dll.  Here is the code as bellow:

<PagerStyle HorizontalAlign="Right" Position="Bottom" VerticalAlign="Middle" Mode="NumericPages">

</PagerStyle>


Thank you

Murali
Pavlina
Telerik team
 answered on 06 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
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?