Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
122 views
How could I RadDateTimePicker Enable/Disable using java script

Advance Thanks
Tamim
Tamim
Top achievements
Rank 1
 answered on 29 May 2012
22 answers
965 views

I have the RadScriptManager and the RadComboBox working correctly on my site for most users, but several have reported encountering JavaScript errors that I cannot reproduce/ troubleshoot.

The details of the error they are encountering are below.  Anyone have any ideas on how to resovle/troubleshoot this?


 

The error seems to imply a request that does not return JavaScript, but that doesn’t make sense since the error is occurring with http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Core.js

Error Details:
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; Tablet PC 2.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; Zune 4.7)

 

Timestamp: Tue, 8 Feb 2011 00:00:24 UTC

Message: Invalid character

Line: 1

Char: 1

Code: 0

URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Core.js

 

Message: Invalid character

Line: 1

Char: 1

Code: 0

URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/jQuery.js

 

Message: Invalid character

Line: 1

Char: 1

Code: 0

URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/jQueryPlugins.js

 

Message: Invalid character

Line: 1

Char: 1

Code: 0

URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Navigation/NavigationScripts.js

 

Message: Invalid character

Line: 1

Char: 1

Code: 0

URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/ComboBox/RadComboBoxScripts.js

 

Message: 'Telerik' is undefined

Line: 306

Char: 5

Code: 0

URI: http://mySiteUrl

Dimitar Terziev
Telerik team
 answered on 29 May 2012
6 answers
126 views
I have a grid which uses advanced databinding to a collection of custom objects. My declaration is below. The grid exists in a pageview of a tab which is not selected by default. When I switch to the tab this grid is on, I get the following javascript error and the grid does not display:

a[d].get_visible is not a function

which points to line 1561 of the script resource:
var a=this._owner.get_masterTableView().get_columns(); 
for(var d in a){if(!a[d].get_visible()){this._owner.get_masterTableView().showColumn(d); //error is here

when I switch tabs, I get a reference to the grid client-side and repaint. What is odd is, if I select the tab this grid is on by default, it binds and displays properly. It is only when the page loads with a different tab by default that this error occurs when I switch to this grid's tab. Anyhow, this page is fairly complicated, so I first wanted to see if you can tell from the error and what it is pointing to, what might be causing this error. I checked the datasource and it has 31 rows and data for each column in the grid declaration, so I don't think it is a data issue.

Grid Declaration:
<telerik:RadGrid id="rgDataSCHX"
                        runat="server"
                        AutoGenerateColumns="False"
                        Skin="Office2007"
                        AllowSorting="False"
                        AllowPaging="False"
                        Height="100%"
                        ShowFooter="False"
                        >
 
            <MasterTableView 
                        DataKeyNames="Id"
                        ClientDataKeyNames="Id"
                        Width="100%"
                        TableLayout="Fixed"
                        UseAllDataFields="True"
                        >
                 
                <Columns>
                    <telerik:GridBoundColumn HeaderStyle-Width="100px" HeaderText="Group" DataField="GroupName"  />
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(#N)" DataField="PlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement Count"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(#D)" DataField="PlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement Pool"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="P(%)" DataField="PlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Placement %"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="60px" HeaderText="WA(#N)" DataField="WorkAssessmentPlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment Count"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="WA(#D)" DataField="WorkAssessmentPlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment Pool"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="WA(%)" DataField="WorkAssessmentPlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Work Assessment %"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="CP(#N)" DataField="NonWorkPlacementStatCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement Count"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="CP(#D)" DataField="NonWorkPlacementPoolCount" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement Pool"/>
                    <telerik:GridBoundColumn HeaderStyle-Width="55px" HeaderText="C(%)" DataField="NonWorkPlacementPctString" HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" HeaderTooltip="Current Community Placement %"/>
                </Columns>
                <CommandItemTemplate>
                 
                </CommandItemTemplate>
            </MasterTableView>
            <ItemStyle BorderStyle="None" />
            <GroupingSettings GroupByFieldsSeparator="" CaseSensitive="False" />
            <ClientSettings  AllowExpandCollapse="False">
                <ClientEvents OnFilterMenuShowing=""  />
                <Selecting AllowRowSelect="False"  />
                <Scrolling AllowScroll="True" UseStaticHeaders="True" ScrollHeight="100%" FrozenColumnsCount="1" />
                <Resizing AllowColumnResize="False" ClipCellContentOnResize="False" EnableRealTimeResize="False" ResizeGridOnColumnResize="True"/>
            </ClientSettings>
            <ExportSettings ExportOnlyData="true" OpenInNewWindow="true" IgnorePaging="true"  >
                <Excel Format="ExcelML" FileExtension="xls" />
            </ExportSettings>
        </telerik:RadGrid>

Andrey
Telerik team
 answered on 29 May 2012
9 answers
125 views
I guess this question was asked in this thread which has a help link expired

I have a timeline view, one slot each day.
Let's say there's an appointment that last 7 days. I would like, programmatically, to have it coloured blue for the first 4 days and red the remaing 3 days (better, setting css style), is it possible?
Thank you
Kate
Telerik team
 answered on 29 May 2012
1 answer
114 views
Currently only one button can be embedded inside a textbox. Is it possible to embeed multiple buttons inside the textbox on the simillar lines?
Vasil
Telerik team
 answered on 29 May 2012
1 answer
103 views
I have a very wide grid with many columns. For many of them the header and data are small but the filter is wide enough to include a textbox, plus the filter icon, plus an extra icon like for a date field.

I'd like to intentionally break these wide filter fields after the textbox so that the entire column width isn't burdened because of the filter.

So:

[textbox] <br/>
{date/time icon + &nbsp; + } [filter icon]

I know there is info available on creating custom filters. I'd like to avoid creating a completely new custom filter (template). I'd rather just get a better handle on styling the default filter for this "simple" purpose.

The TD for filters has an explicit "white-space: nowrap", specifically doing the opposite of what I want. Would a change to CSS class rgFilterRow help here? RadPicker controls are different, more complex.

Is there a better approach to this? Custom FilterTemplate really the way to go when fine tuning like this?

Thanks!
Tsvetina
Telerik team
 answered on 29 May 2012
1 answer
160 views
On a grid that has the alphabetical filter "A B C D E ...ect " is there a way to use the back button on the browser to return to a previous filter?

For example: If I filter by the letter "B" and then click on "F" and want to return to "B", is there a way to hit the back button on the browser to achieve this?

Currently this returns to the previous page like normal behaviour, but my client has asked if this is possible?

Thanks
Landon
Tsvetina
Telerik team
 answered on 29 May 2012
5 answers
334 views
Hi, 

I have this weird alignment problem for my datepickers - the calendar box is really off from the box. 

Attached is the code - I'm using the latest version of radcontrols that I'm aware of.

<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="WebForm1.aspx.vb" Inherits="OcalaPlatformv2.WebForm1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
 
        .style19
        {
            color: #000000;
            height: 25px;
            width: 138px;
        }
        .style13
        {
            width: 173px;
        }
                 
        .style8
        {
            color: #000000;
        }
                 
        .style20
        {
            height: 25px;
            width: 138px;
        }
        .style16
        {
            width: 173px;
            height: 25px;
        }
        .rdfd_{position:absolute}div.RadPicker table.rcSingle .rcInputCell{padding-right:0}.rcSingle .riSingle{white-space:normal}.RadInput_Default{font:12px "segoe ui",arial,sans-serif}.riSingle{box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-khtml-box-sizing:border-box}.riSingle{position:relative;display:inline-block;white-space:nowrap;text-align:left}.RadInput{vertical-align:middle}.riSingle .riDisplay{box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-khtml-box-sizing:border-box}.riDisplay{position:absolute;padding:2px 0 3px 5px;border:0 solid transparent;border-width:1px 2px 0 1px;width:100%;height:100%;overflow:hidden;white-space:nowrap;text-align:left;cursor:default;margin-left:1px}.riSingle .riTextBox{box-sizing:border-box;-moz-box-sizing:border-box;-ms-box-sizing:border-box;-webkit-box-sizing:border-box;-khtml-box-sizing:border-box}
        .style17
    {
        width: 404px;
    }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <telerik:RadSplitter ID="RadSplitter1" Runat="server" Width="800px"
                Height="350px">
        <telerik:RadPane ID="RadPane1" Runat="server" Width="430px">
            <table style="width: 404px; font-size: small;">
                <tr>
                    <td class="style19" style="text-align: right">
                                Customer
                            </td>
                    <td class="style13">
                        <telerik:RadComboBox ID="radComboBoxCustomer" runat="server"
                                    AutoPostBack="true" CssClass="style8" Font-Size="X-Small"
                            Width="200px">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td class="style19" style="text-align: right">
                                Container Size
                            </td>
                    <td class="style13">
                        <telerik:RadComboBox ID="radComboBoxContainerBox" runat="server"
                                    AutoPostBack="True" CssClass="style8" Enabled="false"
                            Width="200px">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr class="style8">
                    <td style="text-align: right" class="style20">
                                Destination
                            </td>
                    <td class="style13">
                        <asp:Label ID="lblDestination" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td class="style19" style="text-align: right">
                                Oceanfreight Method
                            </td>
                    <td class="style13">
                        <telerik:RadComboBox ID="radComboBoxOcnMethodBox" runat="server"
                                    AutoPostBack="True" CssClass="style8" Enabled="false"
                            Width="200px">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr class="style8">
                    <td style="text-align: right" class="style20">
                                Oceanfreight Cost
                            </td>
                    <td class="style13">
                        <asp:Label ID="lblOceanfreightCost" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr class="style8">
                    <td style="text-align: right" class="style20">
                                Zip Code
                            </td>
                    <td class="style13">
                        <asp:Label ID="lblZipCode" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr class="style8">
                    <td style="text-align: right" class="style20">
                                Trucking Company
                            </td>
                    <td class="style13">
                        <asp:Label ID="lbltrucker" runat="server" ForeColor="Black"></asp:Label>
                    </td>
                </tr>
                <tr class="style8">
                    <td class="style20" style="text-align: right">
                                Trucking Cost
                            </td>
                    <td class="style16">
                        <asp:Label ID="lblTruckingCost" runat="server"></asp:Label>
                    </td>
                </tr>
                <tr class="style8">
                    <td class="style20" style="text-align: right">
                                Analysis Date</td>
                    <td class="style16">
                        <telerik:RadDatePicker ID="radDateAnalysis" Runat="server">
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr class="style8">
                    <td class="style20" style="text-align: right">
                                Stage</td>
                    <td class="style16">
                        <telerik:RadComboBox ID="radComboBoxStage" runat="server" CssClass="style8"
                                    Enabled="false" Width="200px">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr class="style8">
                    <td style="text-align: right" class="style20">
                                Analysis Name</td>
                    <td class="style13">
                        <telerik:RadTextBox ID="txtAnalysisName" runat="server" Width="200px">
                        </telerik:RadTextBox>
                    </td>
                </tr>
            </table>
        </telerik:RadPane>
        <telerik:RadPane ID="QuotePane" Runat="server" Width="430px">
            <table class="style17">
                <tr>
                    <td>
                                SAP Quote No</td>
                    <td>
                        <telerik:RadTextBox ID="Box_SAPQuoteNo" Runat="server">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                                Valid For</td>
                    <td>
                        <telerik:RadNumericTextBox ID="Box_ValidFor" Runat="server"
                                    DataType="System.Int32">
                        </telerik:RadNumericTextBox>
                    </td>
                </tr>
            </table>
        </telerik:RadPane>
        <telerik:RadPane ID="CalcPane" Runat="server" Width="430px">
            <table class="style17">
                <tr>
                    <td>
                                Ocala SO Number</td>
                    <td>
                        <telerik:RadTextBox ID="Box_OcalaSONumber" Runat="server">
                        </telerik:RadTextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                                Customer Contracted Delivery Date</td>
                    <td>
                        <telerik:RadDatePicker ID="Box_CustomerDeliveryDate" Runat="server"
                                    Height="20px">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" runat="server"
                                        ViewSelectorText="x">
                            </Calendar>
                            <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" runat="server"
                                        EnableSingleInputRendering="True" Height="20px" LabelWidth="64px">
                            </DateInput>
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr>
                    <td>
                                Customer PO Date</td>
                    <td>
                        <telerik:RadDatePicker ID="Box_CustomerPODate" Runat="server" Height="20px">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" runat="server"
                                        ViewSelectorText="x">
                            </Calendar>
                            <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" runat="server"
                                        EnableSingleInputRendering="True" Height="20px" LabelWidth="64px">
                            </DateInput>
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr>
                    <td>
                                Cut Item</td>
                    <td>
                        <telerik:RadComboBox ID="Box_CutItem" Runat="server">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td>
                                Fill Item</td>
                    <td>
                        <telerik:RadComboBox ID="Box_FillItem" Runat="server">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td>
                                Port of Origin</td>
                    <td>
                        <telerik:RadComboBox ID="Box_PortofOrigin" Runat="server">
                        </telerik:RadComboBox>
                    </td>
                </tr>
                <tr>
                    <td>
                                Factory Requested Ship Date</td>
                    <td>
                        <telerik:RadDatePicker ID="Box_FactoryRequestedDate" Runat="server"
                                    Height="20px">
                            <Calendar UseColumnHeadersAsSelectors="False" UseRowHeadersAsSelectors="False" runat="server"
                                    ViewSelectorText="x">
                            </Calendar>
                            <DateInput DateFormat="M/d/yyyy" DisplayDateFormat="M/d/yyyy" runat="server"
                                    EnableSingleInputRendering="True" Height="20px" LabelWidth="64px">
                            </DateInput>
                            <DatePopupButton HoverImageUrl="" ImageUrl="" />
                        </telerik:RadDatePicker>
                    </td>
                </tr>
                <tr>
                    <td>
                    </td>
                </tr>
            </table>
        </telerik:RadPane>
        <br />
    </telerik:RadSplitter>
</asp:Content>
Tsvetina
Telerik team
 answered on 29 May 2012
4 answers
194 views
I assigned Datatable variable as Datasource for RADGrid in needDataSource event. When editing the row item in the Grid, those changes are not saved back to Datatable automatically. Is there anyway the edits directly go back to datatable and I can save in to database later, only if the user clicks on save by calling Datatable.GetChanges(). for now I have used following code in UpdateCommand event to save the changes back to datatable.

In the following code dtaddress is my datatable

 

protected void rgAddress_UpdateCommand(object sender, GridCommandEventArgs e)

{


GridEditableItem editedItem = e.Item as GridEditableItem;

editedItem.OwnerTableView.AllowAutomaticUpdates = true // this line didnt work

 

 

 

int row = editedItem.RowIndex - 3; //removed header rows.. this is ugly

dtaddress.Rows[row]["address1"] = (editedItem["Address1"].Controls[0] as TextBox).Text;

dtaddress.Rows[row]["address2"] = (editedItem["Address2"].Controls[0] as TextBox).Text;

dtaddress.Rows[row]["city"] = (editedItem["City"].Controls[0] as TextBox).Text;

 dtaddress.Rows[row]["state"] = (editedItem["State"].Controls[0] as TextBox).Text;

 dtaddress.Rows[row]["country"] = (editedItem["Country"].Controls[0] as TextBox).Text;

 dtaddress.Rows[row]["ZipCode"] = (editedItem["ZipCode"].Controls[0] as TextBox).Text;*/

e.Item.OwnerTableView.Rebind();

Also even after it comes out of updatecommand code block, the edit mode doesnt go away. Please help.


Eyup
Telerik team
 answered on 29 May 2012
1 answer
34 views
How can I do my line chart belong to YAxis2 and not YAxis?
Rosko
Telerik team
 answered on 29 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?