Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
86 views

Hi,

 I have a ribbon bar that has a ribbon bar template item.  Inside the template is a RadToolBar.  When I load my page in Chrome, I get a client error.  I don't receive the same error when using Internet Explorer.  If I take the radtoolbar out, the error no longer occurs.  The error is causing my page to stop loading.  I have attached a simple example below.  If you run this page in Chrome you will see the error via the F12 developer console.  It says "Value must not be null for Controls and Behaviors".  Any help with this would be greatly appreciated.  

 

Thank you!

Richard

 

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebTestApplication.Default" %>
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager runat="server"></asp:ScriptManager>
    <telerik:RadRibbonBar ID="TestRibbonBar" runat="server"
        EnableAjaxSkinRendering="true"
        Visible="True" Skin="Windows7" Width="100%"
        Height="100px" CssClass="RadToolBarHeight">
        <telerik:RibbonBarTab ID="rbtTest" Width="250px">
            <telerik:RibbonBarGroup ID="rbgSearch" Text="Search Tests" Value="TestSearch"
                BorderStyle="None" CssClass="TestSearchBar">
                <Items>                   
                    <telerik:RibbonBarTemplateItem ID="rbtItem" BorderStyle="None" CssClass="TestSearchBar" >
                        <Template>               
                            <telerik:RadToolBar ID="tlbSearch" runat="server" CausesValidation="False" AutoPostBack="True"
                                CssClass="TestSearchBar" Skin="Windows7" BorderStyle="None" >
                                <Items>
                                    <telerik:RadToolBarButton CommandName="SearchBy" CommandArgument="none" runat="server"
                                        Text="" CausesValidation="false" CssClass="TestSearchBar_SearchByBtn">
                                        <ItemTemplate>
                                        </ItemTemplate>
                                    </telerik:RadToolBarButton>
 
                                     
                                </Items>
                            </telerik:RadToolBar>
                        </Template>
                    </telerik:RibbonBarTemplateItem>
                </Items>
            </telerik:RibbonBarGroup>
        </telerik:RibbonBarTab>
    </telerik:RadRibbonBar>
    </form>
</body>
</html>

Richard
Top achievements
Rank 1
 answered on 08 Apr 2015
3 answers
122 views
Hi,

I am using RadTreeView with checkboxes in RadTab, when i click on tab page is posting back and TreeView forgets checked items.How to preserve the checked item switch between tabs.

Our application is already in testing phase. I would appriciate quick reply on same

Thanks,
EssMus
Top achievements
Rank 1
 answered on 08 Apr 2015
2 answers
128 views

Hi,

I am using the ClientExportManager to export to Pdf the HTML content of a Div .

The pdf is generated correctly but the special characters (é,è,€) have been replace ( by Ø,Ł,‹).

I have tried to to set a different fonts but i get the same result every time.

The characters are correctly displayed on the page but are changed on the pdf.

Is there any way to force a set of characters ?

How can I fix this problem ?

 

Thanks for your time .

 

Jean Luc Farnaud
Top achievements
Rank 1
 answered on 08 Apr 2015
5 answers
605 views
I'm expiriencing the following problem

I have Grid and 2 filters. Second filter is being filled based on selected value in first one.

Here is the code
protected void OnItemCreated(object sender, GridItemEventArgs e)
{
    GridFilteringItem item = e.Item as GridFilteringItem;
 
    if (item != null)
    {
        RadComboBox planIdCombo = (RadComboBox)item.FindControl("planIdFilterComboBox");
        RadComboBox pbpIdCombo = (RadComboBox)item.FindControl("pbpIdFilterComboBox");
 
        planIdCombo.DataSource = SNPConfigView.Select(t => t.PlanID).Distinct().OrderBy(t => t);
        planIdCombo.DataBind();
        planIdCombo.SelectedValue = e.Item.OwnerTableView.GetColumn("PlanId").CurrentFilterValue;
 
        pbpIdCombo.DataSource =  SNPConfigView.Where(t => t.PlanID == planIdCombo.SelectedValue || string.IsNullOrEmpty(planIdCombo.SelectedValue)).Select(t => t.PBPID).Distinct().OrderBy(t => t);
        pbpIdCombo.DataBind();
        pbpIdCombo.SelectedValue = e.Item.OwnerTableView.GetColumn("PbpId").CurrentFilterValue;
    }
}

All is working fine untill you change First filter selected value (in case value in second filter was changed). It throws "Selection out of range Parameter name: value".

I even tried to add items to the second combobox manually (instead of binding it). In this case on code behind it doesn't throw exception but it does throw it on client side (javascript). Error is the same.

I've tried almost everything but still cannot make it work.

<telerik:GridBoundColumn DataField="PlanId" HeaderText="Plan ID" UniqueName="PlanId"  AutoPostBackOnFilter="true"      CurrentFilterFunction="EqualTo" ShowFilterIcon="false" FilterControlWidth="70px">
                                    <ItemStyle CssClass="center"></ItemStyle>
                                    <FilterTemplate>
                                        <telerik:RadComboBox ID="planIdFilterComboBox" Width="60" AppendDataBoundItems="True" OnItemDataBound="OnPlanIdFilterComboItemDataBound" SelectedValue='<%# Container.OwnerTableView.GetColumn("PlanId").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="PlanIdFilterComboIndexChanged">
                                            <Items>
                                                <telerik:RadComboBoxItem Text="All" Value="" />
                                            </Items>
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="planIdFilteringScripBlock" runat="server">
                                            <script type="text/javascript">
                                                function PlanIdFilterComboIndexChanged(sender, args) {
                                                    var tableView = $find("<%# Container.OwnerTableView.ClientID %>");
                                                    tableView.filter("PlanId", args.get_item().get_value(), "EqualTo");
                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="PBPID" HeaderText="PBP" UniqueName="PBPID" AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" ShowFilterIcon="false" FilterControlWidth="40px">
                                    <HeaderStyle Width="70px"></HeaderStyle>
                                    <ItemStyle CssClass="center"></ItemStyle>
                                    <FilterTemplate>
                                        <telerik:RadComboBox ID="pbpIdFilterComboBox" Width="60" EnableViewState="False" OnItemDataBound="OnPbpIdFilterComboItemDataBound" SelectedValue='<%# Container.OwnerTableView.GetColumn("PBPID").CurrentFilterValue %>' runat="server" OnClientSelectedIndexChanged="PbpIdFilterComboIndexChanged">
                                              
                                        </telerik:RadComboBox>
                                        <telerik:RadScriptBlock ID="pbpIdFilteringScripBlock" runat="server">
                                            <script type="text/javascript">
                                                function PbpIdFilterComboIndexChanged(sender, args) {
                                                    var tableView = $find("<%# Container.OwnerTableView.ClientID %>");
                                                    tableView.filter("PBPID", args.get_item().get_value(), "EqualTo");
                                                }
                                            </script>
                                        </telerik:RadScriptBlock>
                                    </FilterTemplate>
</telerik:GridBoundColumn>
Angel Petrov
Telerik team
 answered on 08 Apr 2015
1 answer
163 views

Hello guys,I have a problem with a text color in radEditor. Setting an html to radEditor content on code behind, on UI a part of the text appears in color green despite the fact that no green color is reffered in style, there is only "color:inherit" for a span.  

It is easy to reproduce. Here is the test case for you :          

<telerik:RadEditor ID="txtNotes" runat="server" EditModes="Design" Width="900px" BorderWidth="1"
                Height="420px" ContentAreaMode="Div"
                NewLineMode="Br" EnableTrackChanges="false" StripFormattingOnPaste="NoneSupressCleanMessage">
                <ExportSettings OpenInNewWindow="true">
                </ExportSettings>
            </telerik:RadEditor>

I attached a pict with the resulting UI . Bellow you have  the html code. The only modification we are doing is that we are extracting the body content from html  and set it to radEditor like this :txtNotes.Content = bodyText from file ;

 

HTML CODE FOR RADEDITOR: 

?<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">  <HTML><HEAD>  <STYLE type=text/css> P, UL, OL, DL, DIR, MENU,  PRE { margin: 0 auto;}</STYLE>    <META name=GENERATOR  content="MSHTML 8.00.6001.19298"></HEAD>   <BODY leftMargin=1 rightMargin=1 topMargin=1><strong><em>02/25-<span style="color: inherit; line-height: 1;">Any new developments on this I-Lead? There has got to be a
way we can secure this business with all that activity in Sunnyvale and the
relationships we have.</span></em></strong>
<p class="MsoNormal"><strong><em></em></strong></p>
<p class="MsoNormal"><strong><em>Let&rsquo;s work together to make this happen at the right rate
and stay pattern!!!</em></strong></p></BODY></HTML>

Marin Bratanov
Telerik team
 answered on 08 Apr 2015
1 answer
83 views

Hi!

I'm having a problem with RadToolTipManager.
I have a MS UpdatePanel containing a RadGrid.
It also contains a RadToolTipManager (inside the update panel).

The manager has AutoTooltipify="True" IgnoreAltAttribute="True".

When I do a panel.Update() from source (to reload the ajax panel) I get a JavaScript crash.

It's the follwing code that craches "this._tooltips[this._tooltips.length] = e;" In the function below.

The problem is that "_tooltips" is null.

Is this a know bug ? 

 

createToolTip: function (d, b, c) {
    if (!d) {
      alert("clone error: No target element specified");
      return;
    } var e = this.clone(this._getUniqueToolTipID());
    e._manualCloseButtonText = this._manualCloseButtonText;
    e.set_modal(e.isModal());
    e._cssClass = this._cssClass;
    var a = d.getAttribute("id");
    if (a) {
      e.set_targetControlID(a);
    } else {
      e.set_targetControl(d);
    } this._tooltips[this._tooltips.length] = e;
    if (b && b != d.getAttribute("id")) {
      e.set_serverTargetControlID(b);
    } if (c) {
      e.set_serverValue(c);
    } if (this._loadOnDemand) {
      this._initializeAjaxToolTip(e);
    } else {
      if (this._webServiceSettings) {
        this._initializeWebServiceToolTip(e);
      }
    } return e;

 

 

Marin Bratanov
Telerik team
 answered on 08 Apr 2015
3 answers
306 views

Hi

 I don't have any joy with toggle buttons. Even the demos

http://demos.telerik.com/aspnet-ajax/button/examples/overview/defaultvb.aspx?show-source=true

dont work when you select "toggle". They seem to display as text - no button, and no ability to skin them

 am I doing something wrong?

best regards

Phil

Danail Vasilev
Telerik team
 answered on 08 Apr 2015
17 answers
1.3K+ views
Making change from in-place editing to editforms with a form template results in the following error:

Unhandled exception at line 3, column 62240 in http://localhost:49573/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;AjaxControlToolkit,+Version=4.5.7.1005,+Culture=neutral,+PublicKeyToken=28f01b0e84b6d53e:en-US:a410b875-5cb5-4d5e-9cf6-234163990602:ea597d4b:b25378d2

0x800a138f - JavaScript runtime error: Unable to set property 'control' of undefined or null reference


Apparently this is happening at other places within the application as well in the deployed version, causing some components (such as RadUpload) not to function correctly. Any feedback on how to solve this would be appreciated. So, I imagine it isn't a Grid error per se, but a ScriptManager error.

Have tried different revs of telerik controls (1015, 926, 917), and different .net levels (4.5, 4.51, 4.0). Have uninstalled and reinstalled with no success.

Working Code:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="TestForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadTextBox ID="txtSelect" runat="server" Width="100%"/>
            <telerik:RadGrid ID="RadGrid_Master" runat="server" AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource_Master" AutoGenerateColumns="False" AllowAutoMaticUpdates="true" >
                <MasterTableView DataSourceID="SqlDataSource_Master" DataKeyNames="Key" EditMode="InPlace" >
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" />
                        <telerik:GridBoundColumn DataField="Key" DataType="System.Guid" FilterControlAltText="Filter Key column" HeaderText="Key" ReadOnly="True" SortExpression="Key" UniqueName="Key" />
                        <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name" MaxLength="30" />
                    </Columns>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource_Master" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnection %>"
                               SelectCommand = "SELECT Key, Name FROM Products"
                               UpdateCommand = "UPDATE Products SET Name = @Name WHERE Key = @Key">
                <UpdateParameters>
                    <asp:Parameter Name="Name" />
                    <asp:ControlParameter ControlID="RadGrid_Master" Name="Key" PropertyName="SelectedValue" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource_Detail" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnection %>" SelectCommand="SELECT * FROM Pricing WHERE RateIndictor = 'W' AND Key = @Key">
                <SelectParameters>
                    <asp:ControlParameter ControlID="RadGrid_Master" Name="Key" PropertyName="SelectedValue" />
                </SelectParameters>
            </asp:SqlDataSource>
        </form>
    </body>
</html>


Not Working Code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="TestForm" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
            <telerik:RadTextBox ID="txtSelect" runat="server" Width="100%"/>
            <telerik:RadGrid ID="RadGrid_Master" runat="server" AllowPaging="True" PageSize="5" DataSourceID="SqlDataSource_Master" AutoGenerateColumns="False" AllowAutoMaticUpdates="true" >
                <MasterTableView DataSourceID="SqlDataSource_Master" DataKeyNames="Key" EditMode="EditForms">
                    <Columns>
                        <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn1" />
                        <telerik:GridBoundColumn DataField="Key" DataType="System.Guid" FilterControlAltText="Filter Key column" HeaderText="Key" ReadOnly="True" SortExpression="Key" UniqueName="Key" />
                        <telerik:GridBoundColumn DataField="Name" FilterControlAltText="Filter Name column" HeaderText="Name" SortExpression="Name" UniqueName="Name" MaxLength="30" />
                    </Columns>
                    <EditFormSettings EditFormType="Template">
                        <FormTemplate>
                            <telerik:RadTextBox ID="RadTextBox1" Runat="server" LabelWidth="64px" Resize="None" Text='<%# Bind("Name", "{0}") %>' Width="160px" MaxLength="30" />
                            <br />
                            <asp:Button ID="btnUpdate" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'/>
                              
                            <asp:Button ID="btnCancel" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" />
                        </FormTemplate>
                    </EditFormSettings>
                </MasterTableView>
            </telerik:RadGrid>
            <asp:SqlDataSource ID="SqlDataSource_Master" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnection %>"
                               SelectCommand = "SELECT Key, Name FROM Products"
                               UpdateCommand = "UPDATE Products SET Name = @Name WHERE Key = @Key">
                <UpdateParameters>
                    <asp:Parameter Name="Name" />
                    <asp:ControlParameter ControlID="RadGrid_Master" Name="Key" PropertyName="SelectedValue" />
                </UpdateParameters>
            </asp:SqlDataSource>
            <asp:SqlDataSource ID="SqlDataSource_Detail" runat="server" ConnectionString="<%$ ConnectionStrings:TestConnection %>" SelectCommand="SELECT * FROM Pricing WHERE RateIndictor = 'W' AND Key = @Key">
                <SelectParameters>
                    <asp:ControlParameter ControlID="RadGrid_Master" Name="Key" PropertyName="SelectedValue" />
                </SelectParameters>
            </asp:SqlDataSource>
        </form>
    </body>
</html>

Maria Ilieva
Telerik team
 answered on 08 Apr 2015
4 answers
183 views
Hi All,

I am facing an issue with Rad Grid that, whan i am clearing Rad Grid programmatically, it is not clearing its column filter text. But all the records in Grid are cleared.

Please have a look into the below url for better idea,
http://www.telerik.com/account/support-tickets/view-ticket.aspx?threadid=220410

Can any one help to clear the grid either from client side or from server side?


Thanks,
KKB.
karthik
Top achievements
Rank 1
 answered on 08 Apr 2015
2 answers
55 views

I am binding my grid using AJAX and PageMethods like below

$(document).ready(function () {
 
PageMethods.GetEmployees(updateGrid, err);
//bindSourceGrid();
});
 
function updateGrid(result) {
 
var tableView = $find("<%= SourceGrid.ClientID %>").get_masterTableView();
 
tableView.set_dataSource(result);
 
tableView.dataBind();
}
 
function err(e) {
 
}

function RadGrid1_DataBound(sender, args) {
alert("Grid with id: " + sender.get_element().id + " bound on the client");
}

function SourceGrid_RowDataBound(sender, args) {
}

function GridCreated(sender, eventArgs) {


}

I am getting result back from server, but during rendering getting javascript error (Please see the attached image). My aspx is like below which hasn't any master and an independent sample page with reference to JQuery. Any clue here would be appreciated.

<telerik:RadScriptManager ID="ScriptManager" runat="server" />
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
</telerik:RadAjaxLoadingPanel>
<telerik:RadGrid ID="SourceGrid" runat="server" ShowGroupPanel="false" AllowSorting="false" ShowFooter="true" AllowPaging="false" HeaderStyle-CssClass="tableHeading br" AutoGenerateColumns="false" GridLines="Both" EnableViewState="false">
<ClientSettings>
<Virtualization EnableVirtualization="true" InitiallyCachedItemsCount="2000" ItemsPerView="100" />
<Scrolling AllowScroll="true" UseStaticHeaders="true"></Scrolling>
<Resizing AllowColumnResize="true" />
<ClientEvents OnCommand="SourceGrid_Command" OnGridCreated="GridCreated" OnRowDataBound="SourceGrid_RowDataBound" />
</ClientSettings>
<ExportSettings>
<Excel />
</ExportSettings>
<GroupingSettings ShowUnGroupButton="true"></GroupingSettings>
<MasterTableView ShowGroupFooter="false" GridLines="Both" DataKeyNames="" GroupHeaderItemStyle-Font-Underline="true">
<CommandItemSettings ExportToPdfText="Export to PDF"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column" Created="True">
</ExpandCollapseColumn>
<Columns>

 

 

 

Viktor Tachev
Telerik team
 answered on 08 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?