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

TimePicker

4 Answers 123 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Alexandre
Top achievements
Rank 1
Alexandre asked on 09 Dec 2008, 02:29 PM
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> 

4 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 09 Dec 2008, 02:34 PM
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.
0
Alexandre
Top achievements
Rank 1
answered on 09 Dec 2008, 02:48 PM
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.
0
Alexandre
Top achievements
Rank 1
answered on 09 Dec 2008, 03:05 PM

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
0
Alexandre
Top achievements
Rank 1
answered on 09 Dec 2008, 04:12 PM
I have found the solution.

I had to add a Databind in the userControl
Tags
Calendar
Asked by
Alexandre
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Alexandre
Top achievements
Rank 1
Share this question
or