Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi there,
   After I upgrade my project from 2012.3.1016.40 to  2013.3.1114.40 I receive a javascript error.

JavaScript runtime error: Unable to get property 'getElementsByTagName' of undefined or null reference

   This occurs with the call _updateFilterControlValue.  Below is the code we use to filter the grid.  It doesn't seem to matter if it's Firefox, IE, or Chrome.  The error still occurs.

       

var filterExpression = new Telerik.Web.UI.GridFilterExpression();

var filterFunction = Telerik.Web.UI.GridFilterFunction.EqualTo;

filterExpression.set_fieldName("iExpertID");

filterExpression.set_fieldValue(iExpertID);

filterExpression.set_filterFunction(filterFunction);

filterExpression.set_columnUniqueName("iExpertID");

grid.get_masterTableView()._updateFilterControlValue(iExpertID, "iExpertID", filterFunction);

grid.get_masterTableView()._filterExpressions.clear();

grid.get_masterTableView()._filterExpressions.add(filterExpression);

grid.get_masterTableView().set_pageSize(10);

grid.get_masterTableView().rebind();

 

 

 

 

Milena
Telerik team
 answered on 07 Jan 2014
1 answer
114 views
Does anyone have an idea why is this happening??

it happens so randomly and it seems to be related to the ListView control, used IE 9+ and Chrome latest version to test it and it happens on both browsers. 

html parsing issue

What is happening here, for some reason the browser suddenly stopped parsing the html and displays the html code instead of the input elements, as you can notice, in the screen shoot, it stops "drawing" the fields and it does not throw any java script or code behind exceptions.
Radoslav
Telerik team
 answered on 07 Jan 2014
15 answers
803 views
Team,

Scenario
 : I have to assign the Mask property dynamically in Code Behind. 
Issue : Not able to type anything on the textbox field and nothing to display

IN ASPX:
<telerik:RadMaskedTextBox ID="tbHours" runat="server" SelectionOnFocus="SelectAll"                                                                                     CssClass="RadMaskedTextBox80" Height="20px"></telerik:RadMaskedTextBox>

IN C#
If (true)
{
tbHours.Text = "00.0";
tbHours.Mask = "<0..99>.<0..9>";
}
else
{
tbHours.Text = "00:00";
tbHours.Mask = "<00..23>:<00..59>"; 
}

Vasil
Telerik team
 answered on 07 Jan 2014
1 answer
90 views
Hi, this is Tom

I have been struggling with raising issues with the demo on your website, which is My Portal dock panel.
http://demos.telerik.com/aspnet-ajax/dock/examples/myportal/defaultcs.aspx

I used the example code as provided from the page and I found a issue that it dose not let me add new dock after closing one of docks on the zones. I even tested the given example on the website.
You can test that: add two any docks and close those two docks. After that, add new a dock. then you will see the issue.
I do not know how to fix this problem, it takes me so long time to figure it out. Please let me know how to deal with it!!!!!!
Slav
Telerik team
 answered on 07 Jan 2014
1 answer
589 views
Hi,
     I need a toggle box with two buttons inside it, on clicking a button in each row of the Radgrid..once I clicked one of the buttons inside the toggle box , it must be set as readonly..Is it possible ..? pls help me with a code..
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
168 views
Hi,

I want some solution that would handle all the three scenarios mentioned below.
Scenario 1:
I am using Content property of RadEditor to get values entered by the user in the RadEditor control. However, I see that every space in the value entered by user is getting converted to &nbsp;. For example, if user has entered the value as - 'Hi Hello' in the editor, the value we get from RadEditor1.Content is  - 'Hi&nbsp;Hello'. I don't want this to happen.

Scenario 2:
Also, my requirement is that in the same editor the user should be able to insert nonbreaking space by Ctrl+Shift+Space. For example, if the user types 'Hi(Ctrl+Shift+Space)Hello' we must get the value as 'Hi&nbsp;Hello'.

Scenario 3:
Also, if user manually types &nbsp; in the editor, it should be retained as it is and should not get replaced with space.

I tried using Text property of RadEditor. But it handles only first scenario mentioned and considers Ctrl+Shift+Space as normal space and not as &nbsp;

Answer through sample code would be helpful.

Thanks,
Prajna
Ianko
Telerik team
 answered on 07 Jan 2014
3 answers
1.0K+ views
Hi,

How can Apply the Own Custome Css on RadTextBox and RadTextArea with examples.

Kind Regards,
Rahul
Shinu
Top achievements
Rank 2
 answered on 07 Jan 2014
3 answers
155 views
Hi,
how apply the hight to Radtexbox in percentage not a pixcel. Please explain it with example.

Kind Regards,
Rahul
Princy
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
288 views
Hi,
i'm using two radcombobox inside a radgrid editform template
<div class="art-layout-cell layout-item-1" style="width: 100%;">
    <div class="art-layout-cell layout-item-4" style="width: 30%;">
        <asp:Label ID="label_SelectCompany" AssociatedControlID="cmb_company" runat="server" Text="Company Name:" />
    </div>
    <div class="art-layout-cell layout-item-4" style="width: 60%;">
        <telerik:RadComboBox runat="server" ID="cmb_company" Height="250" AppendDataBoundItems="True" CausesValidation="False" CollapseDelay="10" SelectedValue='<%# Bind("CompanyID") %>'
            DataMember="DefaultView" AutoPostBack="true" ExpandDelay="0" ItemRequestTimeout="0" Width="80%" MarkFirstMatch="True" EmptyMessage="- Select Company -"
            DataSourceID="SqlDataSource_Company" DataTextField="CompanyName" DataValueField="ID" OnSelectedIndexChanged="cmb_company_SelectedIndexChanged" />
        <asp:RequiredFieldValidator ID="CompanyRequired" runat="server" ControlToValidate="cmb_company" ErrorMessage="*" ForeColor="Red" ValidationGroup="CompanyGroup" />
    </div>
</div>  <%-- cmb_company --%>
<div class="art-layout-cell layout-item-1" style="width: 100%;">
    <div class="art-layout-cell layout-item-4" style="width: 30%;">
        <asp:Label ID="label_CommercialActivity" AssociatedControlID="cmb_commercialActivity" runat="server" Text="Commercail Activity:" />
    </div>
    <div class="art-layout-cell layout-item-4" style="width: 60%;">
        <telerik:RadComboBox runat="server" ID="cmb_commercialActivity" AppendDataBoundItems="True" CausesValidation="False" CollapseDelay="10" DataMember="DefaultView"
            ExpandDelay="0" ItemRequestTimeout="0" Width="80%" MarkFirstMatch="True" EmptyMessage="- Select Commercial Activity -" SelectedValue='<%# Bind("EmployeeCommercialActivityID") %>'
            DataSourceID="SqlDataSource_CommercialActivity" DataTextField="CommercialActivityEnglishName" DataValueField="ID" />
        <%--<asp:RequiredFieldValidator ID="CommercialActivityRequired" runat="server" ControlToValidate="cmb_commercialActivity" ErrorMessage="*" ForeColor="Red" ValidationGroup="CompanyGroup" />--%>
    </div>
</div>  <%-- cmb_commercialActivity  --%>

and the sqldatasource is:
<asp:SqlDataSource ID="SqlDataSource_CommercialActivity" runat="server" ConnectionString="<%$ ConnectionStrings:HRSystemDataBaseConnection %>" SelectCommand="SELECT APP_CompaniesCommercialActivities.ID, APP_CommercialActivities.CommercialActivityEnglishName FROM APP_CompaniesCommercialActivities INNER JOIN APP_CommercialActivities ON APP_CompaniesCommercialActivities.CommercialActivityID = APP_CommercialActivities.ID WHERE (APP_CompaniesCommercialActivities.CompanyID = @CompanyID) ORDER BY APP_CommercialActivities.CommercialActivityEnglishName">
    <SelectParameters>
        <asp:SessionParameter Name="CompanyID" SessionField="CompanyID" />
    </SelectParameters>
</asp:SqlDataSource>
                                   
<asp:SqlDataSource ID="SqlDataSource_Company" runat="server" ConnectionString="<%$ ConnectionStrings:HRSystemDataBaseConnection %>"
    SelectCommand="SELECT ID, CompanyName FROM APP_Companies ORDER BY CompanyName" />

and the codebehind is:
Protected Sub cmb_company_SelectedIndexChanged(sender As Object, e As RadComboBoxSelectedIndexChangedEventArgs)
    Session("CompanyID") = e.Value
     
    Dim _EditForm As GridEditFormItem = DirectCast(DirectCast(sender, RadComboBox).NamingContainer, GridEditFormItem)
 
    Dim _CommercialActivity As RadComboBox = DirectCast(_EditForm.FindControl("cmb_commercialActivity"), RadComboBox)
    _CommercialActivity.ClearSelection()
End Sub


when i tried to change the company name it shows an error
"Databinding methods such as Eval(), XPath(), and Bind() can only be used in the context of a databound control."



Regards,
rafsan
Princy
Top achievements
Rank 2
 answered on 07 Jan 2014
1 answer
142 views
Hi, Telerik's team

I am with a problem on try perform updates in my radlistview filled by an objectdatasource.

I can put my radlistview in edit mode using "commands", but I cant update the data.

I used the template displayed in the radlistview page to create my page, but there are not example about how to make updates in radlistview using objectdatasource.

Please, give me a way to update data in control and after edition end, I wanna get the edited data and save in my database.



<telerik:RadListView ID="radListView" ItemPlaceholderID="CustomersContainer"
runat="server" OnItemCommand="radListView_ItemCommand"
DataKeyNames="ID" AllowPaging="True"  PageSize="1" Width="90%">
     <LayoutTemplate>
          <fieldset id="fsRadListView" style="width: 1000px !important;">
   <legend style="margin:0px 0px 0px 15px !important">Empréstimos</legend>
        <table cellpadding="0" cellspacing="0" width="100%">
           <tr>
             <td>
               <telerik:RadDataPager ID="RadDataPager1"
                                 runat="server" PagedControlID="radListView" 
PageSize="1">
                 <Fields>
                 <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                 <telerik:RadDataPagerButtonField FieldType="Numeric" ></telerik:RadDataPagerButtonField>
                 <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                 <telerik:RadDataPagerGoToPageField SubmitButtonText="Go" TextBoxWidth="15" />
                 <telerik:RadDataPagerTemplatePageField>
                    <PagerTemplate>
                       <div style="float: right">
                         <b>Items
                       <asp:Label runat="server" ID="CurrentPageLabel"
                                                   Text="<%# Container.Owner.StartRowIndex+1%>" />
                       to
                       <asp:Label runat="server" ID="TotalPagesLabel"
                                                   Text="<%# Container.Owner.StartRowIndex+Container.Owner.PageSize %>" />
                       of
                       <asp:Label runat="server" ID="TotalItemsLabel"
                                                   Text="<%# Container.Owner.TotalRowCount%>" />
                       <br />
                        </b>
                      </div>
                  </PagerTemplate>
                </telerik:RadDataPagerTemplatePageField>
               </Fields>
              </telerik:RadDataPager>
             </td>
            </tr>
         </table>
      </fieldset>
<asp:PlaceHolder ID="PlaceHolder" runat="server"></asp:PlaceHolder>
<br >
      </LayoutTemplate>
      <ItemTemplate>
          <fieldset class="fieldSetBackgroud">
    <div class="divForm" style="text-align: left">
         <label class="labelForm">Product :</label>
         <asp:Label ID="lblProduto" runat="server" Text='<%# Eval("ProductName")%>'></asp:Label>
   </div>
   <div class="divForm" style="text-align: left">
         <label class="labelFormulario">Factory :</label>
         <asp:Label ID="Label10" runat="server" Text='<%# Eval("Factory")%>'></asp:Label>
   </div>
   <div class="divForm" style="text-align: left">
         <label class="labelForm">Amount :</label>
         <asp:Label ID="Label11" runat="server" Text='<%# Eval("Amount")%>'></asp:Label>
   </div>
   <div class="divForm" style="text-align: left">
         <label class="labelForm">Total Price :</label>
         <asp:Label ID="Label15" runat="server" Text='<%# Eval("TotalPrice")%>'></asp:Label>
   </div>
   <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="Edit" class="edit button"></asp:Button>
 </fieldset>
       </ItemTemplate>
       <EditItemTemplate>
 <fieldset class="fieldSetBackgroud">
    <div class="divForm" style="text-align: left">
        <label class="labelForm">Product:</label>
        <asp:Label  runat="server" Text='<%# Eval("ProductName")%>'></asp:Label>
    </div>
    <div class="divForm" style="text-align: left">
        <label class="labelForm">Factory:</label>
        <telerik:RadTextBox ID="txtFactory" runat="server" Text='<%# Eval("Factory")%>'></telerik:RadTextBox>
    </div>
    <div class="divForm" style="text-align: left">
        <label class="labelForm">Quantidade :</label>
        <telerik:RadNumericTextBox ID="txtAmount" runat="server" Value='<%#Eval("Amount")%>' ></telerik:RadNumericTextBox>
    </div>
    <div class="divForm" style="text-align: left">
        <label class="labelFormulario">Total Price :</label>
        <telerik:RadNumericTextBox ID="txtTotalPrice" runat="server" Value='<%#Eval("TotalPrice")%>'></telerik:RadNumericTextBox>
    </div>
    <asp:Button ID="btnUpdate" runat="server" Text="Update Item" CommandName="Update" ToolTip="Apply changes."></asp:Button>
    <asp:Button ID="btnCancel" runat="server" Text="Cancel" CommandName="Cancel" ></asp:Button>
 </fieldset>
        </EditItemTemplate>
</telerik:RadListView>

<asp:ObjectDataSource ID="objectdatasource" runat="server" SelectMethod="ListItems"
                    TypeName="...my namespace..."></asp:ObjectDataSource>

Radoslav
Telerik team
 answered on 07 Jan 2014
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?