TimePicker

5 posts, 0 answers
  1. Alexandre
    Alexandre avatar
    8 posts
    Member since:
    Nov 2008

    Posted 09 Dec 2008 Link to this post

    Hi everyone,
        Can anyone help me with this:

    My RadTimePicker is inside a user control that is used to edit a RadGrid.
    When i click in the grid to go into edit mode, i have this error message:

    Provided DataSource for timeView is not supported

    Telerik.Web.UI.dll - RadTimeView.DataBind System.Web.dll - Control.DataBindChildren System.Web.dll - Control.DataBind System.Web.dll - Control.DataBind System.Web.dll - Control.DataBindChildren System.Web.dll - Control.DataBind System.Web.dll - Control.DataBind System.Web.dll - Control.DataBindChildren System.Web.dll - Control.DataBind System.Web.dll - Control.DataBind System.Web.dll - Control.DataBindChildren System.Web.dll - Control.DataBind System.Web.dll - Control.DataBind System.Web.dll - Control.DataBindChildren System.Web.dll - Control.DataBind System.Web.dll - Control.DataBind Telerik.Web.UI.dll - GridEditFormItem.SetupItem Telerik.Web.UI.dll - GridItemBuilder.CreateItems Telerik.Web.UI.dll - GridTableView.CreateItems Telerik.Web.UI.dll - GridTableView.CreateControlHierarchy Telerik.Web.UI.dll - GridTableView.CreateChildControls System.Web.dll - CompositeDataBoundControl.PerformDataBinding System.Web.dll - DataBoundControl.OnDataSourceViewSelectCallback System.Web.dll - DataSourceView.Select System.Web.dll - DataBoundControl.PerformSelect Telerik.Web.UI.dll - GridTableView.PerformSelect System.Web.dll - BaseDataBoundControl.DataBind Telerik.Web.UI.dll - GridTableView.DataBind Telerik.Web.UI.dll - GridTableView.Rebind Telerik.Web.UI.dll - GridCommandEventArgs.ExecuteCommand Telerik.Web.UI.dll - RadGrid.OnBubbleEvent System.Web.dll - Control.RaiseBubbleEvent Telerik.Web.UI.dll - GridItem.OnBubbleEvent System.Web.dll - Control.RaiseBubbleEvent System.Web.dll - ImageButton.OnCommand System.Web.dll - ImageButton.RaisePostBackEvent System.Web.dll - ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent System.Web.dll - Page.RaisePostBackEvent System.Web.dll - Page.RaisePostBackEvent System.Web.dll - Page.ProcessRequestMain

    <Telerik:TimePicker ID="txtPlannedDuration" runat="server" Culture="French (Canada)" 
                    Style="width: 58px; " TabIndex="322">  
                    <TimePopupButton CssClass="" ImageUrl="" HoverImageUrl=""></TimePopupButton> 
                    <TimeView runat="server" CellSpacing="-1" Culture="French (Canada)" 
                        Interval="00:30:00" Column="5">  
                    </TimeView> 
                    <DateInput Width="" LabelCssClass="">  
                    </DateInput> 
                    <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False" ViewSelectorText="x">  
                    </Calendar> 
                    <DatePopupButton Visible="False" CssClass="" ImageUrl="" HoverImageUrl=""></DatePopupButton> 
                </Telerik:TimePicker> 
  2. Dimo
    Admin
    Dimo avatar
    8478 posts

    Posted 09 Dec 2008 Link to this post

    Hello Alexandre,

    In order to find out what datasource types are supported by RadTimeView, please refer to:

    http://demos.telerik.com/aspnet-ajax/Calendar/Examples/DateTimePicker/CustomCollection/DefaultCS.aspx


    Sincerely yours,
    Dimo
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Alexandre
    Alexandre avatar
    8 posts
    Member since:
    Nov 2008

    Posted 09 Dec 2008 Link to this post

    Hi Dimo,

    I went to the link you provided me but this doesn't help.

    The aspx code that I provided in my previous post is used elsewhere in my application and work great. This problem is really just happening in this case where the TimePicker is in a UserControl used to Edit a RadGrid.

    I hope this help clarify the situation I'm in.
  4. Alexandre
    Alexandre avatar
    8 posts
    Member since:
    Nov 2008

    Posted 09 Dec 2008 Link to this post

    I have also try this with the same result:

    Page aspx.vb

     Private Sub grdProcedure_ItemCreated(ByVal sender As ObjectByVal e As Telerik.Web.UI.GridItemEventArgs) Handles grdProcedure.ItemCreated  
            Dim uscProcedureEdit As uscProcedure  
            If TypeOf e.Item Is Telerik.Web.UI.GridEditableItem AndAlso e.Item.IsInEditMode Then
                uscProcedureEdit = CType(e.Item.FindControl(Telerik.Web.UI.GridEditFormItem.EditFormUserControlID), uscProcedure)  
                uscProcedureEdit.SetSharedTimeView(RadTimeViewShared)  
                uscProcedureEdit.InitCombo()  
                uscProcedureEdit.SetValues(GetData.Tables("table1").DefaultView, e.Item.DataSetIndex, cboService.SelectedValueToInt)  
            End If 

    UserControl ascx.vb
     Public Sub SetSharedTimeView(ByVal r_RadTimeViewShared As Telerik.Web.UI.RadTimeView)  
            txtPlannedDuration.SharedTimeView = r_RadTimeViewShared  
     End Sub 

    PS. I get the error after exiting grdProcedure_ItemCreated
  5. Alexandre
    Alexandre avatar
    8 posts
    Member since:
    Nov 2008

    Posted 09 Dec 2008 Link to this post

    I have found the solution.

    I had to add a Databind in the userControl
Back to Top