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

How to get controltype in GridView Column

3 Answers 104 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Siingh
Top achievements
Rank 2
Siingh asked on 03 Jun 2011, 04:00 AM
Hi
I have GRidview with this Column
<telerik:GridViewDataColumn Header="In"  DataMemberBinding="{Binding TimeIn}" >
                                    <telerik:GridViewDataColumn.CellEditTemplate>
                                        <DataTemplate>
                                            <telerik:RadDateTimePicker Culture="en-GB"  SelectedDate="{Binding TimeIn}" TimeInterval="0:30:00" IsTooltipEnabled="False"/>
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellEditTemplate>
                                </telerik:GridViewDataColumn>

Now this column doesnt set SelectedDate to bounded date and i thought to do other way around on BeginningEdit routine.

I want to know how to get DateTimePicker control while edit mode to setup manually databound value to Datetimepicker.

anyhelp please.


Kind Regards:

3 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 03 Jun 2011, 12:44 PM
Hi Siingh,

To have it working you will need a two way binding as in the sample attached

Best wishes,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Siingh
Top achievements
Rank 2
answered on 06 Jun 2011, 03:27 AM
Hi Pavel
its not working your sample with DataTable however you example works with inbuilt databinding e.g class, objects but with DataTable its now.

can you send me example or sample which uses DataTable as datasource and i want to bind gridview on button click with DateTimePicker Column.


Kind regards:
0
Pavel Pavlov
Telerik team
answered on 06 Jun 2011, 01:09 PM
Hello Siingh,

We can be in assistance for problems related to our controls and we do not have the resources to always be in help when it comes to general programming knowledge.

In your case it is the WPF specifics when binding to a datatable that causes the trouble - please enclose the column name in square brackets - this should solve the problem :)

Something like :

<telerik:RadDateTimePicker SelectedValue="{Binding [TimeIn], Mode=TwoWay}" />


Best wishes,
Pavel Pavlov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
GridView
Asked by
Siingh
Top achievements
Rank 2
Answers by
Pavel Pavlov
Telerik team
Siingh
Top achievements
Rank 2
Share this question
or