This is a migrated thread and some comments may be shown as answers.

ISSUE Error RadDatePicket with RadBibbonBar

1 Answer 74 Views
Input
This is a migrated thread and some comments may be shown as answers.
Giancarlo
Top achievements
Rank 1
Giancarlo asked on 08 Jun 2012, 03:01 AM

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) +878

is necessary to comment that the control radribbonbar has many problems ... Telerik team, why they launched a control with too many errors and incomplete?

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 26 Jun 2012, 02:08 PM
Hello Giancario,

Here the error is not due to the issue with RadRibbonBar,Binding a RadDatePicker control to a data source is easy provided when you use the DbSelectedDate property. It works almost like the SelectedDate one, but does not throw an exception when given a null value.

Thanks,
Princy.
Tags
Input
Asked by
Giancarlo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or