or
| <script type="text/javascript"> |
| function OnClientLoad(editor, args) { |
| editor.fire("SelectAll"); |
| editor.fire("ApplyClass", { value: ".default" }); |
| } |
| </script> |
Figured out that it need an object with a get_value() method:
| <script type="text/javascript"> |
| function OnClientLoad(editor, args) { |
| editor.fire("SelectAll"); |
| objCssClass = new Object(); objCssClass.get_value = function() { return ".default"; } |
| editor.fire("ApplyClass", objCssClass); |
| } |
| </script> |
Button propertyOnClientClicking = function(sender, args) { FnButton_ClientClicking(sender, args, event) };JavaScriptfunction FnButton_ClientClicking(sender, args, e){}
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="HowToDisplayHdrTooltipsInTelerikRadgrid._Default" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %><asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent"></asp:Content><asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent"> <asp:ScriptManager runat="server" /> <telerik:RadGrid ID="grid" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" AllowSorting="true" GridLines="None"> <ClientSettings AllowColumnsReorder="True"> </ClientSettings> <MasterTableView DataKeyNames="ProductID" DataSourceID="SqlDataSource1"> <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings> <Columns> <telerik:GridBoundColumn DataField="ProductID" DataType="System.Int32" HeaderText="ProductID" ReadOnly="True" AllowSorting="true" SortExpression="ProductID" UniqueName="ProductID" HeaderTooltip="product id tooltip"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="ProductName" HeaderText="ProductName" AllowSorting="true" SortExpression="ProductName" UniqueName="ProductName" HeaderTooltip="product name tooltip"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" UniqueName="CategoryName" HeaderTooltip="category name tooltip"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UnitPrice" DataType="System.Decimal" HeaderText="UnitPrice" SortExpression="UnitPrice" UniqueName="UnitPrice" HeaderTooltip="unit price tooltip"> </telerik:GridBoundColumn> <telerik:GridBoundColumn DataField="UnitsInStock" DataType="System.Int16" HeaderText="UnitsInStock" AllowSorting="false" UniqueName="UnitsInStock" HeaderTooltip="units in stock tooltip"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid> <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" SelectCommand="SELECT [ProductID], [ProductName], [CategoryName], [UnitPrice], [UnitsInStock] FROM [Alphabetical list of products]"> </asp:SqlDataSource></asp:Content>
describe the steps to replicate the error
Fatal error,
1. Add an RadRibbonBar Control and add a button and add an event handler onButtonClick
<telerik:RadRibbonBar runat=server ID="rb" onbuttonclick="kg111_ButtonClick"> <Tabs> <telerik:RibbonBarTab> <telerik:RibbonBarGroup> <Items> <telerik:RibbonBarButton Text="Hola" Value="111" /> </Items> </telerik:RibbonBarGroup> </telerik:RibbonBarTab> </Tabs> </telerik:RadRibbonBar>
2. Add an RadDatePicker Control
<telerik:RadDatePicker ID="RadDatePicker1" runat="server"> </telerik:RadDatePicker>3. compile and Run.
4. Select a date
5. place the cursor in the text box RadDatePicker control, or rather, place the focus on the control RadDatePicker
6. Immediately after the button click of RadRibbonBar (skip the error here)
Telerik Asp.net Version : Q1 2012
Test Browser: IE 9, Opera 11.64, Chrome, Etc
ERROR
Text property cannot be set. String was not recognized as a valid DateTime. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Text property cannot be set. String was not recognized as a valid DateTime.Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [InvalidCastException: Text property cannot be set. String was not recognized as a valid DateTime.] Telerik.Web.UI.RadDateInput.RangeTextProperty(String value) +181 Telerik.Web.UI.RadDateInput.set_Text(String value) +17 Telerik.Web.UI.DatePickingInput.LoadPostData(String postDataKey, NameValueCollection postCollection) +554 Telerik.Web.UI.RadWebControl.System.Web.UI.IPostBackDataHandler.LoadPostData(String postDataKey, NameValueCollection postCollection) +13 System.Web.UI.Page.ProcessPostData(NameValueCollection postData, Boolean fBeforeLoad) +327 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +878is necessary to comment that the control radribbonbar has many problems ... Telerik team, why they launched a control with too many errors and incomplete?
