Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
138 views
Hey all

On a webpage (see attachment*) with a RadGrid and a handfull of other Telerik controls we get some pretty odd behaviour which, however, can be reproduced time and again.
* uploading attachment doesnt seem to work, see here for the picture

When the page is loaded for the first time with the table hidden and after a partial (UpdatePanel) postback is initiated the control is shown with data but the height goes wrong and in IE we are able to see a JavaScript error (shown below).
The strange thing is that the main RadGrid div is properly set to the height of 450px but the rgDataDiv is somehow set to 300px (and no this is not done in code, css or javascript by any custom coding).
We use similar code on 3 more similar pages following the same scenario but these show no error and renders the grid with a total of 450px height and the rgDataDiv gets an 392px height which makes it fit perfectly.

Error;
Sys.ArgumentUndefinedException: Value cannot be undefined.
Parameter name: type  ScriptResource.axd?d=vUoTpDxDbR3vJWc5PDPuLYP64nfdrWbf-K52duDrCOVUeQueTMBQzu_1dzOmybqNDuWGBU4UdD1duqTGm1ioStXKKocFu18wOuSUO_RD3MM1&t=ffffffffec2d9970, line 2705 character 12
 
In function;
var $create = Sys.Component.create = function Sys$Component$create(type, properties, events, references, element) {
....
 
In file;
// Name:        MicrosoftAjax.debug.js
// Assembly:    System.Web.Extensions
// Version:     3.5.0.0
// FileVersion: 3.5.30729.4926

When viewing the source of the rendered HTML all $create calls are related to Telerik controls (hence the post on this forum). And i see about a dozen of these:
Sys.Application.add_init(function() {
    $create(Telerik.Web.UI.RadDateInput,
    {"_focused":false,
    "_originalValue":"16-10-2009 0:00:00",
    "_postBackEventReferenceScript":"__doPostBack(\u0027ctl00$ctl18$g_729422f7_feb9_4651_91f8_ddbfeff99049$ctl00$historicalSelectionDateFromPicker\u0027,\u0027\u0027)",
    "clientStateFieldID":"ctl00_ctl18_g_729422f7_feb9_4651_91f8_ddbfeff99049_ctl00_historicalSelectionDateFromPicker_dateInput_ClientState",
*snip* 
    "incrementSettings":{InterceptArrowKeys:true,InterceptMouseWheel:true,Step:1},
    "styles":{HoveredStyle: ["width:100%;",
    "riTextBox riHover"],InvalidStyle: ["width:100%;",
    "riTextBox riError"],DisabledStyle: ["width:100%;",
    "riTextBox riDisabled"],FocusedStyle: ["width:100%;",
    "riTextBox riFocused"],EmptyMessageStyle: ["width:100%;",
    "riTextBox riEmpty"],ReadOnlyStyle: ["width:100%;",
    "riTextBox riRead"],EnabledStyle: ["width:100%;",
    "riTextBox riEnabled"]}},
    {"error":DateError,
    "keyPress":ClearError},
    null,
    $get("ctl00_ctl18_g_729422f7_feb9_4651_91f8_ddbfeff99049_ctl00_historicalSelectionDateFromPicker_dateInput"));
});


Sofar i've also tried to add some custom Javascript code to the ClientEvents OnGridCreated but this script does not appear to get executed at all.
var radGridByClass = $('.rgDataDiv');
if (radGridByClass.length == 0) return;
var radGridID = radGridByClass[0].id;                              
var radGrid = document.getElementById(radGridID);
var mainheight = $('.RadGrid').height();
var gridHeaderheight = $('.rgHeaderDiv').height();
radGrid.style.height = mainheight - gridHeaderheight + 'px';

Now this isn't the prettiest code but when i execute it directly in the browser from a Firebug Console it works.

Any help is very much welcome :)

Kind regards,

Maarten Bos

Environment details;
Sharepoint 2010, ASP.Net 3.5, Telerik Ajax controls 2010.1.519.35
Daniel
Top achievements
Rank 1
 answered on 08 Sep 2010
5 answers
736 views
I have looked at several different examples of how to clear a RadNumericTextBox with JavaScript, but for some reason I can't get them to work. I created a small sample page that I have included below. Could someone show me how to write an onlick-script so that the button clears the textbox.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test.aspx.cs" Inherits="Test" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title>Test RadNumericTextBox</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <telerik:RadNumericTextBox ID="numeric" runat="server" />
        <input type="button" value="Clear" />
        <asp:ScriptManager ID="manager" runat="server" />
    </div>
    </form>
</body>
</html>

Rapitoloco
Top achievements
Rank 1
 answered on 08 Sep 2010
1 answer
195 views
Hi,

In the chart, I have to show the chart data table. Using Data table property I make it happen. Please see in attachment. Now, problem is, there are two series, which needs to be show n legends and on the chart but don't want to show those in chart table. (in my case, these are Median Score and Trend Line).

I use following code to make this chart:

Chart1.PlotArea.XAxis.DataLabelsColumn = "DateString";
Chart1.PlotArea.YAxis.AutoScale = false;
Chart1.PlotArea.YAxis.Step = 100;
Chart1.PlotArea.YAxis.MinValue = double.Parse(dsData.Tables[0].Rows[0]["MinValue"].ToString());
Chart1.PlotArea.YAxis.MaxValue = double.Parse(dsData.Tables[0].Rows[0]["MaxValue"].ToString());
 
Chart1.Series.Clear();
 
foreach (DataColumn column in dsData.Tables[0].Columns)
{
    if (column.ColumnName.Contains("Series"))
    {
        ChartSeries series = new ChartSeries(column.ColumnName, ChartSeriesType.Point);
 
        series.DefaultLabelValue = "#Y";
        series.DataYColumn = column.ColumnName;
 
        rcCreditSummary.Series.Add(series);
    }
}
 
ChartSeries series1 = new ChartSeries("Median Score", ChartSeriesType.Line);
 
series1.DefaultLabelValue = "#Y";
series1.DataYColumn = "AvgScore";
series1.Visible = true;
series1.Appearance.LabelAppearance.Visible = false;
 
Chart1.Series.Add(series1);
 
ChartSeries trendLineSeries = new ChartSeries("Trend Line", ChartSeriesType.Line);
trendLineSeries.DefaultLabelValue = "#Y";
trendLineSeries.DataYColumn = "TrendLineScore";
trendLineSeries.Visible = true;
trendLineSeries.Appearance.LabelAppearance.Visible = false;
             
Chart1.Series.Add(trendLineSeries);
 
Chart1.DataSource = dsData.Tables[0];
Chart1.IntelligentLabelsEnabled = false;
Chart1.DataBind();


Is there any way to make it happen.

JAMIL
Ves
Telerik team
 answered on 08 Sep 2010
1 answer
109 views
I am building a rotator that auto crossfades through different banner ads in a loop.
I've set up an automatic advance slideshow, but now my client wants to have some frames showing for longer that others.

Is it possible to change the frame timings independently using either server-side or client-side script?

For example; frame1=5 seconds, frame 2=10secs, frame2 = 5 secs, frame 4=20secs etc..


Many thanks,
Ian

Fiko
Telerik team
 answered on 08 Sep 2010
1 answer
158 views
Telerik,

in my radGrid i got a GridTemplate Column, which contain a Label Control.
this Label Carries combination of two feilds .  ( label.text = description + extended description )
because i required combination two feild values in a single column.
The Issue is now, i can't able to filter this GridTemplate  using rad grid's filter option.

I am tring to impliment filter Template on this gridTemplate Column.
can any body help me how to impliment this filter template. OR if any body have better suggesion for filtering this column ( other than this ), please send to me.

Code used for gridTemplate Column:
<telerik:GridBoundColumn DataField="description" HeaderText="Description" SortExpression="description"
    UniqueName="description" Display="false">
</telerik:GridBoundColumn>
<telerik:GridBoundColumn DataField="extendedDescription" HeaderText="Ext. Description"
    SortExpression="extendedDescription" UniqueName="extendedDescription" Display="false">
</telerik:GridBoundColumn>
<telerik:GridTemplateColumn UniqueName="description1" HeaderText="Description">
    <ItemTemplate>
        <asp:Label ID="lblDescription" runat="server" Text='<%# Eval("description")& " - " & Eval("extendedDescription") %>'></asp:Label>
    </ItemTemplate>
    <FilterTemplate>
        <telerik:RadTextBox ID="RdTxtName" EmptyMessage="Search" runat="server" EmptyMessageStyle-Font-Italic="true"
            HoveredStyle-Font-Italic="true" Width="100%">
        </telerik:RadTextBox><asp:Button ID="btnFilter" runat="server" Width="20px" Text="" OnClientClick="return filterName()" />
    </FilterTemplate>
</telerik:GridTemplateColumn>

Thanks in Advance.
kks
 
Pavlina
Telerik team
 answered on 08 Sep 2010
1 answer
93 views
When I click a row to open its hierarchy, how can I let Grid close existing opened hierarchy automatically and leave only the newly opened hierarchy open?
Pavlina
Telerik team
 answered on 08 Sep 2010
1 answer
131 views

I have the following mapped in my Entity Data Model to my Database
Products
ProductName
CreatedDate
UpdatedDate
...

I then created a partial class, which gives an additional property to Products
public partial class Product
{
    public DateTime LatestDate
    {
       get
       {
            if(UpdateDate.HasValue)  return UpdateDate.Value;
             return CreatedDate;
        }
    }
}

I then did the following:

 

 

 

 

<asp:EntityDataSource ID="EntityDataSource1" runat="server"

 

 

 

 

ConnectionString="name=TwModelContainer"

 

 

 

 

 

 

 

 

 

DefaultContainerName="TwModelContainer" EnableFlattening="false"

 

 

 

 

EntitySetName="Products">

 

 

 

 

 

 

 

 

 

</asp:EntityDataSource>

 

 


<telerik

 

 

:RadGrid ID="RadGrid1" runat="server" AllowPaging="True"

 

 

 

 

AutoGenerateColumns="False" DataSourceID="EntityDataSource1"

 

 

 

 

GridLines="None" onitemcreated="RadGrid1_ItemCreated" AllowSorting="True">

 

<

 

 

 

MasterTableView DataSourceID="EntityDataSource1" DataKeyNames="Id">

 

<

 

 

telerik:GridSortExpression FieldName="LastDate" SortOrder="Descending" />


Unfortunately, this does not work. I can easily show the created field LastDate in the Grid, but sorting won't work. It gives me the following error:
 'LastDate' is not a member of type 'TwModel.Product' in the currently loaded schemas. Near simple identifier, line 6, column 4

I guess in means that sorting works only for what is availabe in the database schema, but how would I accomplish the above with an additional calculated property, i.e. LastDate?

 

 

 

Iana Tsolova
Telerik team
 answered on 08 Sep 2010
2 answers
118 views
The attached image is showing you the two right most header columns of a grid. 

The 'Locations' column is a GridBoundColumn, and the 'Add to my selections' is a GridTemplateColumn. All of the columns have an underline, except this last column does not have sorting enabled, so I do not want it to display the underline. I've tried overriding it, but that hasn't worked, so I've set a CssClass on the column. When I do that, this 'line' seems to come thru the column, and I can't figure out how to get rid of it. 

If I remove the CssClass from the last column, the 'line' disappears, and only displays in that 'little box' on the far right (a scroll bar is underneath it).
Tim
Top achievements
Rank 1
 answered on 08 Sep 2010
1 answer
190 views

Hi,

I have problems with the radtooltipmanager control and the IE browser.

Before starting explain the problem, please view the page: http://www.israel-jewelry-center.com/Pages/Categories/Rings.aspx. In the bottom of this page there is a pager.

Now, the problem is: If the user going over the first item in the first page he will see an ajax tooltip with a content (Content1), and if the user go to the second page and going over the first item in that page he will see the same content as Content1, and so on for all items (The content includes the same image as the selected one but in big size). This problem is just in IE versions. I tested it in FireFox, Google Chrome, Safari.... and there was no problem.

I think the problem due to the <telerik:RadToolTipManager  />.

It seems that RadToolTipManager cache the args when you change the page number in IE.

    protected void OnAjaxUpdate(object sender, ToolTipUpdateEventArgs args)
    {
        this.UpdateToolTip(args.Value, args.UpdatePanel);
    }
I'm not sure

 

Please, view a sample application which contains the problem:

http://www.israel-jewelry-center.com/AppDemo1/SampleApplication.rar

Please open the page: ~/Pages/Categories/Rings.aspx

Please, I need an emergency help.
It is apprecired to send me the modified code with an explaination.

regards,

Bader

Svetlina Anati
Telerik team
 answered on 08 Sep 2010
1 answer
219 views
Hi,

I have aproblem with the megration of radtooltip control on radlistview contro.
Plaese download my sample application from:  http://www.israel-jewelry-center.com/AppDemo1/RadToolTipOnRadListView.rar
and view the page ~/Page/Categories/Rings.aspx

As you can see I have a radlistview control with a pager. If you go over the items 1-21 (Page 1) then a radtootip will be displayed (contains the big size of the hovered image with descreption), and when you go the next items (Page 2) then the tootip will be displayed but with the same content as page 1. In other words, in page 2 the radtooltip control doesn't display the big size of the hovered image but it displayes the big size of the image from the previous page. Please try it.

Please, It is vey emergency so I need help,
It is appreciated to send me a modified code.

Regards,
Bader
Svetlina Anati
Telerik team
 answered on 08 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?