Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
169 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
96 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
323 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.4K+ 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
189 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
58 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
8 answers
372 views
Hello,

I'm looking for a way to control the culture of the edit form that is created by a radgrid's edit button

I've got a radgrid connected to a simple objectdatasource.
There are two date values in the object.
This is my page load:

        protected void Page_Load(object sender, EventArgs e)
        {
            RadGrid1.Culture = new CultureInfo("en-GB");
            //RadGrid1.Rebind();
        }

I've set DataFormatString="{0:dd/MM/yyyy}" on the date gridboundcolumns

Now the problem is, the dates are in en-GB in the grid, but when clicking edit, the format is assumed to be en-US

basically I can have a date of 2/11/2011 (November 2, 2011) in the grid, click edit and see 2/11/2011 in the edit box, click update, and the radgrid now displays 11/2/2011 (February 11, 2011), if I click edit again and update, the radgrid will display 2/11/2011

Now, this time when I click edit, if I enter 2 November 2011, then the date is passed correctly, in en-GB. This makes me think that this edit form is assuming en-US, even though the grid (and the thread culture) is en-GB.

Adding the RadGrid1.Rebind(); to the page load seems to fix the problem,  but then multple edit buttons start appearing
Konstantin Dikov
Telerik team
 answered on 08 Apr 2015
2 answers
62 views

Hi,

 

I use UI for ASP.NET AJAX v.2013.2.717.40 in my ASP.Net application. With the built in Skin WebBlue.

The application is deployed and is functioning as expected.

 

However some of my clients that use the application complain that the skinning of certain controls are not working. However whenever I test from various clients (Chrome, IE) it does render.

 

I have supplied Two images, one showing that the RadWindow border is not showing on my clients browser, but on mine it does.

 

Can you point me in a right direction please?

 

 

Paul
Top achievements
Rank 1
 answered on 08 Apr 2015
2 answers
49 views
Hi,
I am in the situation that I have some data in a container class in my codebehind. I need to be able to access this data when i capture a keypress whic means that the approach the article on keypresses can't be used since i have to capture and process the keypress in JS. Is there a way to capture this in the codebehind?

The article I am talking about is http://www.telerik.com/help/aspnet-ajax/grid-onkeypress.html 

Regards
Casper Andersen
Casper
Top achievements
Rank 1
 answered on 08 Apr 2015
3 answers
139 views
Hi,

I would like to create filter exactly as shown in the upper grid here - http://demos.telerik.com/aspnet-ajax/grid/examples/functionality/filtering/filter-templates/defaultvb.aspx 
I succeeded in creating the rad combo radgrid filters  for autogenerated columns = false, but I have no idea on how to do it for autogenerated columns. There are about 40 columns and I need to apply filters for 3 columns. For the inbuilt radgrid filter, I handle radgrid's columncreated(). But I have no clue on how to replace these with the customized rad combo filter.

I have 40 columns in the table. I used the exact radcombo aspx code in above mentioned demo and made radgrid's datasource as "select * from table", it worked perfectly but the columns are repeated, meaning, col1 and col5 are the columns that has combo filters. When using autogenerated columns, the radgrid is displayed with col1 and col5 and all 40 columns(col1 thru col40).
Eyup
Telerik team
 answered on 08 Apr 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?