Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
108 views
Hello,
I was trying to copy this scenario: http://demos.telerik.com/aspnet-ajax/htmlchart/examples/functionality/datanavigation/defaultcs.aspx
in my project. I copied RadHtmlChart block of code with datasource and file as well. 

I found that all Chart turns white without nothing on it and i Get JS error:
"Uncaught TypeError: Cannot read property 'length' of undefined Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_rsm_TSM&compress=1&_TSM_CombinedScripts_=%3b…:16929"

Then i did comment on Navigator Series code. and after that top chart was showed proper. 
After that i turned back to 2014.1.403.40 build where everything is ok. 

Can you help me by telling what cause that error?

Danail Vasilev
Telerik team
 answered on 03 Oct 2014
1 answer
206 views
Hi,

I am creating a chart with two ColumnSeries with X-Axis containing Date and Y-Axis containing Item count. Now I want to create a stacked chart for the two series. Below is the program i have got. When I ran this, I am getting attached Chart which has X-Axis items not overlapping. For Series2, X-Axis items are again added. Even though, I am checking for the duplicates, it is adding the x-axis item. 

I cannot use Date as X-Axis type because, it only supports Databound objects. Is there a way to achieve my desired behavior without X-Axis values overlapping?

Satish



        private void UpdateOperationsChart()
        {
            SqlDataClient prodClient = new SqlDataClient(DataSource.Prod);
            prodClient.Init();

            DataTable table200 = prodClient.GetProvisioningOperations(OperationType.SelectedText,200);
            DataTable table500 = prodClient.GetProvisioningOperations(OperationType.SelectedText,500);

            ProvisioningChart.PlotArea.XAxis.TitleAppearance.Text = "Day";
            ProvisioningChart.PlotArea.YAxis.TitleAppearance.Text = "Request Duration In Mins";

            AxisY axisY = new AxisY();
            axisY.Name = "Operation Count";
            ProvisioningChart.PlotArea.AdditionalYAxes.Add(axisY);

            ProvisioningChart.PlotArea.XAxis.Type = Telerik.Web.UI.HtmlChart.AxisType.Category;
            ProvisioningChart.PlotArea.XAxis.AxisCrossingPoints.Add(0);
            ProvisioningChart.PlotArea.XAxis.AxisCrossingPoints.Add(100);

            LineSeries durationAvgSeries = new LineSeries();
            durationAvgSeries.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.Blue;

            ColumnSeries request200Series = new ColumnSeries();
            ColumnSeries request500Series = new ColumnSeries();
            //request200Series.AxisName = "200";
            //request500Series.AxisName = "500";
            request200Series.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.Green;
            request500Series.Appearance.FillStyle.BackgroundColor = System.Drawing.Color.Red;

            foreach (DataRow row in table200.Rows)
            {
                //durationAvgSeries.SeriesItems.Add(Decimal.Parse(row["AvgDurationInMin"].ToString()));
                request200Series.SeriesItems.Add(Decimal.Parse(row["OperationCount"].ToString()));
                AxisItem xAxisItem = new AxisItem(Convert.ToDateTime(row["Day"].ToString()).Month + "/" + Convert.ToDateTime(row["Day"].ToString()).Day);
                if (!ProvisioningChart.PlotArea.XAxis.Items.Contains(xAxisItem))
                    ProvisioningChart.PlotArea.XAxis.Items.Add(xAxisItem);
            }

            foreach (DataRow row in table500.Rows)
            {
                //durationAvgSeries.SeriesItems.Add(Decimal.Parse(row["AvgDurationInMin"].ToString()));
                request500Series.SeriesItems.Add(Decimal.Parse(row["OperationCount"].ToString()));
                AxisItem xAxisItem = new AxisItem(Convert.ToDateTime(row["Day"].ToString()).Month + "/" + Convert.ToDateTime(row["Day"].ToString()).Day);
                if (!ProvisioningChart.PlotArea.XAxis.Items.Contains(xAxisItem))
                    ProvisioningChart.PlotArea.XAxis.Items.Add(xAxisItem);
            }
            
            ProvisioningChart.PlotArea.Series.Add(request200Series);
            ProvisioningChart.PlotArea.Series.Add(request500Series);            
            //ProvisioningChart.PlotArea.Series.Add(durationAvgSeries);

            request200Series.Stacked = true;

            request500Series.Name = "500";
            request200Series.Name = "200";
            durationAvgSeries.Name = "AvgDurationInMin";

            prodClient.Close();
        }
Danail Vasilev
Telerik team
 answered on 03 Oct 2014
1 answer
101 views
Is there any easy way to add some additional controls on the pager without using a template and (thereby) redefine the complete pager?

Today I have a DropDown where the user can select to what depth the TreeList should be expanded. It would be very nice if I in some way could have this dropDown located on the Pager instead of outside of the TreeList control, but I don't want to redefine the complete Pager with all it's current controls, just add one extra on the existing line. I've attached a screen shot indication what I want to do.

What is the simplest way of doing this?
Eyup
Telerik team
 answered on 03 Oct 2014
4 answers
368 views
Hi I have a RadCombobox control, and a requiredFieldValidator that validates it for empty text.
The thing is that when I tried to key in any text, it gives me the validation error (instead of the other way round). So when I typed in "testing" it prompts the error. When I removed it, it is still there.
The error will not disappear until I tried to select one of the item inside the dropdownlist.
Anyone had any idea?

Below is my aspx code:

<telerik:RadComboBox ID="radProcessLn" runat="server" AllowCustomText="true" EnableScreenBoundaryDetection="False" EmptyMessage="Insert/select" />
<asp:RequiredFieldValidator ID="rfvProcessLn" ControlToValidate="radProcessLn" ErrorMessage="Please enter Process Ln / Operation" InitialValue="" ValidationGroup="Submit" CssClass="mandatory" runat="server"Display="Dynamic" />

Update: Tested it out on Google Chrome, IE8, and IE7 and the validation is working just fine. But it's not in IE9.
Bilawal
Top achievements
Rank 1
 answered on 03 Oct 2014
11 answers
328 views
Hi,

I am using radnumeric textboxes inside gridview, and trying to set their visiblity by javascript, but neither set_visible(), nor the .display='', is working.
I tried by taking a simple textbox outside the grid too, but for that also set_visible is not working.

Here is my code for the gridview textboxes.

  var   rows = document.getElementById('<%= grdTeeDetails.Clientid%>').rows;       
    for(i=1;i <rows.length;i++) 
            {                                  
                if(document.getElementById('ctl00_cphMainContent_grdTeeDetails_ctl02_txtLPar' + i) != null) 
               {  
                    document.getElementById('ctl00_cphMainContent_grdTeeDetails_ctl02_txtLPar' + i).style.visibility='visible';                
                    document.getElementById('ctl00_cphMainContent_grdTeeDetails_ctl02_txtLPar' + i).style.display='';       
                    txtLPar=$find(document.getElementById('ctl00_cphMainContent_grdTeeDetails_ctl02_txtLPar' + i).id);      
                    txtLPar.set_visible(true);     
                }                                 
           }               


There is not a single javascript bug, but the code is not working.


Thanks,
Mansi Shah

Eyup
Telerik team
 answered on 03 Oct 2014
1 answer
217 views
As you know it is mandatory to set the ExportOnlyData property to true when using ExcelML format. Thanks to that GridCheckBoxColumn is exported as TRUE/FALSE in Excel spreadsheet. How can we have that column exported as checkbox as in old HTML-Based Excel Format?
Konstantin Dikov
Telerik team
 answered on 03 Oct 2014
9 answers
92 views
Dears,
I have an issue using radDatePicker on chrome, as when I select 1st Aug 2014, it sets the selected date to 1st Sep 2014 ?
to reproduce go to
http://demos.telerik.com/aspnet-ajax/calendar/examples/datepicker/custompopup/defaultcs.aspx
and try to select 1/Aug/2014

Konstantin Dikov
Telerik team
 answered on 03 Oct 2014
1 answer
100 views
I am wondering how I would go about turning off the automatic orientation for the combobox. I am running into an issue where the dropdown is going up and underneath my menu.
Alexander
Top achievements
Rank 1
 answered on 02 Oct 2014
2 answers
416 views
Hi,

I am trying to update a read-only GridDateTimeColumn field in a Rad Grid while the item is being edited. The computation to do the update is to calculate the calendar date based off the Julian date in a RadNumeric TextBox. I am able to get the two controls client ID's by using the following code server-side on the Item Created event:

RadNumericTextBox rnumtxt1 = item.FindControl("gtbJulianDate") as RadNumericTextBox;
RadDatePicker picker = (RadDatePicker)item["GroundDate"].Controls[0] as RadDatePicker;

rnumtxt1.Attributes.Add("onBlur", "return updateGround('" + rnumtxt1.ClientID + "','" + picker.ClientID + "')");

The javascript function finds the RadNumeric TextBox just fine and can perform the computation, but when I set the picker field on the client-side, it always ends up being null. I use the following code to set the variables:

var julianTxtBox = $find(txt1);    
var groundDate = $find(txt2);

Can you please help by letting me know why that is not working or if there are any other ways to access that field and set it on the client?

Thanks,

Joe
Joe
Top achievements
Rank 1
 answered on 02 Oct 2014
12 answers
1.4K+ views
I want to change some behaviour in the the expand column of a RadGrid. I don't seem to have any control over the column even though I am adding code that seems like it should provide control. For instance I add this line in my .aspx page :
<ExpandCollapseColumn Visible="false"></ExpandCollapseColumn>
It doesn't matter if I choose True or False, the column is still there. 
I change the button type or any of the options I get in intellisense but the grid renders the same.
I want to add a header to the column for my users since they don't seem to comprehend what the arrow is for
without instructions. I'm posting what I think is the relevant markup in case I did something wrong here.
Thanks for any help.
<telerik:RadGrid    ID="RadGrid1" 
                       EnableAJAX="True" 
                       DataSourceID="sdsRefrigerantCylinders"
                       runat="server" 
                       Width="100%" 
                       AutoGenerateColumns="False" 
                       PageSize="20" 
                       AllowSorting="True"
                       Skin="Outlook" 
                       AllowPaging="True" 
                       AllowAutomaticUpdates="True" 
                       AllowAutomaticInserts="True"
                       ShowStatusBar="True"
                       GridLines="None">
       <PagerStyle Mode="NextPrevAndNumeric"></PagerStyle>
         
   <MasterTableView    DataSourceID="sdsRefrigerantCylinders" 
                       CommandItemDisplay="top"
                       CommandItemSettings-AddNewRecordText="Insert New Cylinder"
                       DataKeyNames="CylinderID,SiteID" 
                       AllowMultiColumnSorting="true" 
                       AllowAutomaticUpdates="true" 
                       AllowAutomaticInserts="true"
                       Name="Cylinders"
  <ExpandCollapseColumn Visible="True" ButtonType="PushButton" ItemStyle-BackColor="red">
           </ExpandCollapseColumn>
           
 <Columns
               <telerik:GridEditCommandColumn HeaderStyle-Width="50px"  EditText="Edit Cylinder" >
                   <HeaderStyle Width="50px"></HeaderStyle>
               </telerik:GridEditCommandColumn>
                 
               <telerik:GridTemplateColumn UniqueName="CylinderID" HeaderText="Cylinder ID" SortExpression="CylinderID" DataField="CylinderID"
                   ItemStyle-Width="50px" HeaderStyle-Width="50px">
                   <ItemTemplate>
                       <asp:Label ID="lblCylinderID" runat="server" Text='<%# Eval("CylinderId") %>'></asp:Label>
               </ItemTemplate>
               
                   <HeaderStyle Width="50px"></HeaderStyle>
                   <ItemStyle Width="50px"></ItemStyle>
               </telerik:GridTemplateColumn>
                 
               <telerik:GridTemplateColumn UniqueName="CylinderSerNo" HeaderText="Serial No" SortExpression="CylinderSerialNO"  HeaderStyle-Wrap="true"
                   ItemStyle-Width="75px" HeaderStyle-Width="70px">
                   <ItemTemplate>
                       <asp:Label ID="lblSerNo" runat="server"  Text='<%# Eval("CylinderSerialNO") %>'></asp:Label>
                   </ItemTemplate>
                   <EditItemTemplate>
                       <telerik:RadTextBox ID="rtbSerNo" runat="server" Text='<%# Bind("CylinderSerialNo") %>'>
                       </telerik:RadTextBox>
                   </EditItemTemplate>
                   <HeaderStyle Width="75px"></HeaderStyle>
                   <ItemStyle Width="75px"></ItemStyle>
               </telerik:GridTemplateColumn>
Maria Ilieva
Telerik team
 answered on 02 Oct 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?