Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
72 views
Hello.

I have a scenario where I need to draw a RED line as an upper marker like in this example.
http://demos.telerik.com/aspnet-ajax/htmlchart/examples/databinding/staticitems/defaultcs.aspx

The line itself is no problem, but can I change the color when making the series programically?
Marin Bratanov
Telerik team
 answered on 04 Nov 2013
1 answer
161 views
A co-worker gave me a modified version of a file and now I can't get the project to compile in Visual Stuio.  As far as I know, we're both using the same source code.  I tried copying the Telerik .dll files from the server (where the code is working) and referencing those files, but I am still getting the same error.  The version of my Telerik .dll files is 2012.1.215.40.  Can you help me with this?

The errors I am getting are

Type 'Telerik.Web.UI.GridPagerStyle' does not have a public property named 'PageSizeControlType'.

Content ('</PagerStyle>') does not match any properties within a 'Telerik.Web.UI.GridTableView', make sure it is well-formed.


The error is from this line:
<PagerStyle PageSizeControlType="RadComboBox"></PagerStyle>

If I comment out that line, I get a whole host of other error messages that are similar (Telerik.XXX does not have a public property named YYY).
Milena
Telerik team
 answered on 04 Nov 2013
2 answers
58 views
I am using ASP.NET C# for my RadGrid and cannot get sorting to work. I have tried a couple of different ways to do it that I have found on this site, and some code from other sites, but the grid remains sorted the default way each time I try. Someone please help!

<telerik:RadGrid runat="server" ID="radProductsGrid" Skin="Default" AllowSorting="true" AllowPaging="true"
 OnSortCommand="radProductsGrid_SortCommand" OnNeedDataSource="radProductsGrid_NeedDataSource"
 AutoGenerateColumns= "false"  GridLines="None" ShowGroupPanel="false" PageSize="100">
 <MasterTableView Width="100%" AllowMultiColumnSorting="false" AllowNaturalSort="false"
  AllowCustomSorting="true" AllowSorting="true" AutoGenerateColumns="false">
  <Columns>
    <telerik:GridBoundColumn ReadOnly="true" AllowFiltering="true" SortExpression="ItemNumber"
      DataField="ItemNumber" HeaderText="Item Number" UniqueName="ItemNumber">
    </telerik:GridBoundColumn>     
    <telerik:GridBoundColumn ReadOnly="true" AllowFiltering="true" SortExpression="ProductName"
      DataField="ProductName" HeaderText="Product Name" UniqueName="ProductName">
    </telerik:GridBoundColumn>
    <telerik:GridBoundColumn ReadOnly="true" AllowFiltering="true" SortExpression="CategoryName"
      DataField="CategoryName" HeaderText="Category Name" UniqueName="CategoryName">
    </telerik:GridBoundColumn>
  </Columns>
 </MasterTableView>
</telerik:RadGrid>
 
 
 
protected void radProductsGrid_SortCommand(object sender, GridSortCommandEventArgs e)
        {
            GridTableView tableView = e.Item.OwnerTableView;
            if (e.SortExpression == "ItemNumber")
            {
                e.Canceled = true;
                GridSortExpression expression = new GridSortExpression();
                expression.FieldName = "ItemNumber";
                if (tableView.SortExpressions.Count == 0 || tableView.SortExpressions[0].FieldName
                        != "ItemNumber")
                {
                    expression.SortOrder = GridSortOrder.Descending;
                }
                else if (tableView.SortExpressions[0].SortOrder == GridSortOrder.Descending)
                {
                    expression.SortOrder = GridSortOrder.Ascending;
                }
                else if (tableView.SortExpressions[0].SortOrder == GridSortOrder.Ascending)
                {
                    expression.SortOrder = GridSortOrder.None;
                }
                tableView.SortExpressions.AddSortExpression(expression);
                tableView.Rebind();
            }
        }


Maria Ilieva
Telerik team
 answered on 04 Nov 2013
2 answers
406 views
Can some one please tell me the upper limit for number of data columns in a telerik datagrid ? I know if I have more than 255 then export to excel wouldn't work. Just wanted to know how many does the data grid allows if I dont plan on using export features.
Konstantin Dikov
Telerik team
 answered on 04 Nov 2013
1 answer
67 views
Hi Telerik

I want to export the RadOrgChart data into a .pdf file. Can somebody guide me how to deal with this?

Thanks in advance
Saira
Shinu
Top achievements
Rank 2
 answered on 04 Nov 2013
11 answers
664 views
As a developer, you need to consider the various time zones which your users are located on.

Some countries use the Daylight saving time (DST) /summer time/ which is the practice of advancing or adjusting backward clocks one hour near the start of a temperate mid-season (spring or autumn). Unfortunately, this adjusting is error-prone to software components and leads to unwanted behavior when using a RadDatePicker.

For instance, let’s assume that you have a web site for renting out various halls or principal rooms for meetings and social affairs, and you use a RadDatePicker to schedule the event date. I am a user from Brazil and with meu amor decided our wedding date to be on October the 20th. However, every time I select this date, the picker re-selects it to be the 19th. I contact you, the web administrator, and ask you “Does destiny want to prevent me from making a big mistake or is this a bug? What is happening, amigo?”

Here is the explanation:

Most probably, I have a Brazilian culture set on my computer:

As noticed in the image, the clocks will be advanced by 1 hour on that date. And since the RadDatePicker takes the zero hour by default, it is actually still on the previous day, because the 20th starts at 01:00 o’clock. To work around this issue, you can use the client side events of the picker:

<telerik:RadDatePicker ID="RadDatePicker1" runat="server">
    <DateInput runat="server">
        <ClientEvents OnValueChanging="valueChanging" OnValueChanged="valueChanged" />
    </DateInput>
</telerik:RadDatePicker>
JavaScript:
var selectedValue = null;
var isDST = false;
function valueChanging(sender, args) {
    if (isDST) {
        args.set_newValue(selectedValue + " 01:00 AM");
        isDST = false;
    }
    selectedValue = args.get_newValue();
}
function valueChanged(sender, args) {
    if (selectedValue) {
        if (selectedValue.indexOf(args.get_newValue()) < 0) {
            isDST = true;
            sender.get_owner().set_selectedDate(); // used only to trigger selecting event
        }
    }
}

If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Kostadin
Telerik team
 answered on 04 Nov 2013
2 answers
93 views
    Hello,
I am using Radgid with filtering. I Have column^
<telerik:GridBoundColumn UniqueName="FULLNAME" CurrentFilterFunction="Contains" ShowFilterIcon="false" AutoPostBackOnFilter="true" />

Autopostback work right untill I add client event handler:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
  if (e.Item is GridFilteringItem)
  {
    GridFilteringItem filterItem = (GridFilteringItem )e.Item;
    (filterItem["FULLNAME"].Controls[0] as TextBox).Attributes.Add("onchange", "CharacterCheck(this, event)");
  }
}
function CharacterCheck(text, e) {
   text.value = text.value.replace(/[^0-9a-zA-Z]/gi, '');
}

After this postback doesn`t raise when I leave focus on filter textbox. How can I resolve this? Can I raise postback mnualy?
Igor Ashmetkov
Top achievements
Rank 1
 answered on 04 Nov 2013
1 answer
193 views
Hi Team,

Can Anyone help to download below version of telerik extension.
Please check attachment for version details.

While trying to download I am getting only kendo version of extension, but I dont need that.

Thanks
Arathi
Kiril Nikolov
Telerik team
 answered on 04 Nov 2013
1 answer
139 views
Hi,
how it's possible create a chart with multiple line series?

for example in my db I have:

Datetime                     Value
06/10/2011 06:00              8
06/10/2011 06:10             12
06/10/2011  06:15            9
06/10/2011  06:18            6
06/10/2011   06:21          9

I want create multiple line series for selected datetime Range where the x-axis is DateTime and the y-axis Value.

I have tried like this but its not plotting its showing only empty series..
                series = new ChartSeries();
                    series.Type = ChartSeriesType.Line;
                    series.Name = "RTD"; series.Clear();
                         ChartSeriesItem item = new ChartSeriesItem();

                 item.YValue = Convert.ToDouble(Sqlds.Tables[0].Rows[i][0]);
                                series.Items.Add(item);
                chart1.PlotArea.XAxis[index].TextBlock.Text = DateTime;
           //Axis 
            chart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "DateTime";

            chart1.PlotArea.XAxis.AutoScale = false;
            chart1.PlotArea.XAxis.Appearance.ValueFormat = Telerik.Charting.Styles.ChartValueFormat.LongDate;
            chart1.PlotArea.XAxis.Appearance.CustomFormat = "mm/dd/yyyy hh:mm:ss";
            chart1.PlotArea.XAxis.Appearance.LabelAppearance.RotationAngle = 90;
 
            //Axis Y
            chart1.PlotArea.YAxis.AxisLabel.TextBlock.Text = "Value";
            chart1.Series.Clear();
            chart1.Series.Add(series2);
           chart1.Series.Add(series1);
            chart1.Series.Add(series);
thanks
Stamo Gochev
Telerik team
 answered on 04 Nov 2013
1 answer
489 views
Good Day 

I have a project that has Telerik Graphs and these Graphs are in a user-control and the Ajax is done from the hosting page. Locally on my machine this works perfectly. but the moment i host it , there is a java-script error that is related to Ajax 

 http://www.crimedetails.com/

If you click on the graphs on the Accordions , you will see they are supposed to be Dynamic , but they dont change because there is an Ajax error that looks like this 
 
Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500 Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
Error.create Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
Sys.WebForms.PageRequestManager._createPageRequestManagerServerError Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:15
Sys.WebForms.PageRequestManager._onFormSubmitCompleted Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:15
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
(anonymous function) Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
Sys.Net.WebRequest.completed Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScri…:6
_onReadyStateChange

Thanks 
Konstantin Dikov
Telerik team
 answered on 04 Nov 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
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?