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

Binding Column in RadGridView

5 Answers 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roger
Top achievements
Rank 1
Roger asked on 01 May 2012, 05:20 PM
In my case, I want to use/bind AutoCompleteBox and RadDatePicker in my RadGridView Column?

How would I do it?

5 Answers, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 02 May 2012, 07:45 AM
Hello Roger,

You can define CellEditTemplate/ CellTemplate for the column as illustrated in our online documentation.
 

Regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Roger
Top achievements
Rank 1
answered on 02 May 2012, 12:59 PM
Thanks..


I have one last question regarding RadGridView.

How will I access the AutoCompleteBox for my binding from the database?

And It seems that after I have edited the cell for my input will not reflect in the row... it goes to blank again.

My inputs will not reflect in the radgridview and it goes to blank again. how would i fix it?

<telerik:RadGridView  Name="promotionsGrid">
                                <telerik:RadGridView.Columns>
                                    <telerik:GridViewDataColumn Header="Designation" HeaderTextAlignment="Center" x:Name="Designation">
                                        <telerik:GridViewDataColumn.CellEditTemplate>
                                            <DataTemplate>
                                                <sdk:AutoCompleteBox ItemsSource="{Binding}" ValueMemberBinding="{Binding Name}" FontSize="12">
                                                    <sdk:AutoCompleteBox.ItemTemplate>
                                                        <DataTemplate>
                                                            <TextBlock Text="{Binding Name}" />
                                                        </DataTemplate>
                                                    </sdk:AutoCompleteBox.ItemTemplate>
                                                </sdk:AutoCompleteBox>
                                            </DataTemplate>
                                        </telerik:GridViewDataColumn.CellEditTemplate>
                                    </telerik:GridViewDataColumn>
</telerik:RadGridView>
0
Pavel Pavlov
Telerik team
answered on 02 May 2012, 01:04 PM
Hello Roger ,

You should use two way binding in order to have the changes reflected back.

Greetings,
Pavel Pavlov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Roger
Top achievements
Rank 1
answered on 02 May 2012, 01:10 PM
How would I do it?
0
naurah
Top achievements
Rank 1
answered on 06 Feb 2014, 03:43 AM
I also had the same problem.. huhu..
Tags
GridView
Asked by
Roger
Top achievements
Rank 1
Answers by
Maya
Telerik team
Roger
Top achievements
Rank 1
Pavel Pavlov
Telerik team
naurah
Top achievements
Rank 1
Share this question
or